Print this page
2869 duplicate packets with vnics over aggrs

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/aggr/aggr_port.c
          +++ new/usr/src/uts/common/io/aggr/aggr_port.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + * Copyright 2012 OmniTI Computer Consulting, Inc  All rights reserved.
  24   25   */
  25   26  
  26   27  /*
  27   28   * IEEE 802.3ad Link Aggregation - Link Aggregation MAC ports.
  28   29   *
  29   30   * Implements the functions needed to manage the MAC ports that are
  30   31   * part of Link Aggregation groups.
  31   32   */
  32   33  
  33   34  #include <sys/types.h>
↓ open down ↓ 487 lines elided ↑ open up ↑
 521  522          int rc;
 522  523  
 523  524          ASSERT(MAC_PERIM_HELD(port->lp_mh));
 524  525  
 525  526          if (on == port->lp_promisc_on)
 526  527                  /* already in desired promiscous mode */
 527  528                  return (0);
 528  529  
 529  530          if (on) {
 530  531                  mac_rx_clear(port->lp_mch);
      532 +                /* We use the promisc callback because without hardware
      533 +                 * rings, we deliver through flows that will cause duplicate
      534 +                 * delivery of packets when we've flipped into this mode
      535 +                 * to compensate for the lack of hardware MAC matching
      536 +                 */
 531  537                  rc = mac_promisc_add(port->lp_mch, MAC_CLIENT_PROMISC_ALL,
 532      -                    aggr_recv_cb, port, &port->lp_mphp,
      538 +                    aggr_recv_promisc_cb, port, &port->lp_mphp,
 533  539                      MAC_PROMISC_FLAGS_NO_TX_LOOP);
 534  540                  if (rc != 0) {
 535  541                          mac_rx_set(port->lp_mch, aggr_recv_cb, port);
 536  542                          return (rc);
 537  543                  }
 538  544          } else {
 539  545                  mac_promisc_remove(port->lp_mphp);
 540  546                  port->lp_mphp = NULL;
 541  547                  mac_rx_set(port->lp_mch, aggr_recv_cb, port);
 542  548          }
↓ open down ↓ 139 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX