Print this page
13230 i40e has duplicate traffic when used with bhyve/snoop running

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/i40e/i40e_main.c
          +++ new/usr/src/uts/common/io/i40e/i40e_main.c
↓ open down ↓ 368 lines elided ↑ open up ↑
 369  369   *  o DMA binding and breaking up the locking in ring recycling.
 370  370   *  o Enhanced detection of device errors
 371  371   *  o Participation in IRM
 372  372   *  o FMA device reset
 373  373   *  o Stall detection, temperature error detection, etc.
 374  374   *  o More dynamic resource pools
 375  375   */
 376  376  
 377  377  #include "i40e_sw.h"
 378  378  
 379      -static char i40e_ident[] = "Intel 10/40Gb Ethernet v1.0.3";
      379 +static char i40e_ident[] = "Intel 10/40Gb Ethern0t v1.0.3";
 380  380  
 381  381  /*
 382  382   * The i40e_glock primarily protects the lists below and the i40e_device_t
 383  383   * structures.
 384  384   */
 385  385  static kmutex_t i40e_glock;
 386  386  static list_t i40e_glist;
 387  387  static list_t i40e_dlist;
 388  388  
 389  389  /*
↓ open down ↓ 1887 lines elided ↑ open up ↑
2277 2277                      "No L2 filter for Default VSI with SEID %u",
2278 2278                      I40E_DEF_VSI_SEID(i40e));
2279 2279          } else {
2280 2280                  i40e_error(i40e, "Failed to remove L2 filter from"
2281 2281                      " Default VSI with SEID %u: %d (%d)",
2282 2282                      I40E_DEF_VSI_SEID(i40e), err, hw->aq.asq_last_status);
2283 2283  
2284 2284                  return (B_FALSE);
2285 2285          }
2286 2286  
     2287 +#if 0
     2288 +        bzero(&filt, sizeof (filt));
     2289 +        bcopy(hw->mac.port_addr, filt.mac_addr, ETHERADDRL);
     2290 +        filt.flags = I40E_AQC_MACVLAN_DEL_PERFECT_MATCH |
     2291 +            I40E_AQC_MACVLAN_DEL_IGNORE_VLAN;
     2292 +        filt.vlan_tag = 0;
     2293 +
     2294 +        ASSERT3U(i40e->i40e_resources.ifr_nmacfilt_used, <=, 1);
     2295 +        i40e_log(i40e, "Num L2 filters (2nd try): %u",
     2296 +            i40e->i40e_resources.ifr_nmacfilt_used);
     2297 +
     2298 +        err = i40e_aq_remove_macvlan(hw, I40E_DEF_VSI_SEID(i40e), &filt, 1,
     2299 +            NULL);
     2300 +        if (err == I40E_SUCCESS) {
     2301 +                i40e_log(i40e,
     2302 +                    "(2nd try) Removed L2 filter from Default VSI with SEID %u",
     2303 +                    I40E_DEF_VSI_SEID(i40e));
     2304 +        } else if (hw->aq.asq_last_status == ENOENT) {
     2305 +                i40e_log(i40e,
     2306 +                    "(2nd try) No L2 filter for Default VSI with SEID %u",
     2307 +                    I40E_DEF_VSI_SEID(i40e));
     2308 +        } else {
     2309 +                i40e_error(i40e, "(2nd try) Failed to remove L2 filter from"
     2310 +                    " Default VSI with SEID %u: %d (%d)",
     2311 +                    I40E_DEF_VSI_SEID(i40e), err, hw->aq.asq_last_status);
     2312 +
     2313 +                return (B_FALSE);
     2314 +        }
     2315 +#endif
2287 2316          /*
2288 2317           *  As mentioned above, the controller created an implicit L2
2289 2318           *  filter for the primary MAC. We want to remove both the
2290 2319           *  filter and decrement the filter count. However, not all
2291 2320           *  controllers count this implicit filter against the total
2292 2321           *  MAC filter count. So here we are making sure it is either
2293 2322           *  one or zero. If it is one, then we know it is for the
2294 2323           *  implicit filter and we should decrement since we just
2295 2324           *  removed the filter above. If it is zero then we know the
2296 2325           *  controller that does not count the implicit filter, and it
↓ open down ↓ 1284 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX