Print this page
11493 aggr needs support for multiple pseudo rx groups
Portions contributed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
@@ -20,10 +20,11 @@
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2012 OmniTI Computer Consulting, Inc All rights reserved.
+ * Copyright 2018 Joyent, Inc.
*/
/*
* IEEE 802.3ad Link Aggregation - Receive
*
@@ -54,11 +55,11 @@
void
aggr_recv_lacp(aggr_port_t *port, mac_resource_handle_t mrh, mblk_t *mp)
{
aggr_grp_t *grp = port->lp_grp;
- /* in promiscuous mode, send copy of packet up */
+ /* In promiscuous mode, pass copy of packet up. */
if (grp->lg_promisc) {
mblk_t *nmp = copymsg(mp);
if (nmp != NULL)
aggr_mac_rx(grp->lg_mh, mrh, nmp);
@@ -72,27 +73,15 @@
* made available by a MAC port, both in promisc_on mode and not.
*/
/* ARGSUSED */
static void
aggr_recv_path_cb(void *arg, mac_resource_handle_t mrh, mblk_t *mp,
- boolean_t loopback, boolean_t promisc_path)
+ boolean_t loopback)
{
aggr_port_t *port = (aggr_port_t *)arg;
aggr_grp_t *grp = port->lp_grp;
- /*
- * In the case where lp_promisc_on has been turned on to
- * compensate for insufficient hardware MAC matching and
- * hardware rings are not in use we will fall back to
- * using flows for delivery which can result in duplicates
- * pushed up the stack. Only respect the chosen path.
- */
- if (port->lp_promisc_on != promisc_path) {
- freemsgchain(mp);
- return;
- }
-
if (grp->lg_lacp_mode == AGGR_LACP_OFF) {
aggr_mac_rx(grp->lg_mh, mrh, mp);
} else {
mblk_t *cmp, *last, *head;
struct ether_header *ehp;
@@ -173,20 +162,11 @@
freemsgchain(head);
}
}
}
-/* ARGSUSED */
void
aggr_recv_cb(void *arg, mac_resource_handle_t mrh, mblk_t *mp,
boolean_t loopback)
{
- aggr_recv_path_cb(arg, mrh, mp, loopback, B_FALSE);
-}
-
-/* ARGSUSED */
-void
-aggr_recv_promisc_cb(void *arg, mac_resource_handle_t mrh, mblk_t *mp,
- boolean_t loopback)
-{
- aggr_recv_path_cb(arg, mrh, mp, loopback, B_TRUE);
+ aggr_recv_path_cb(arg, mrh, mp, loopback);
}