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_gld.c
          +++ new/usr/src/uts/common/io/i40e/i40e_gld.c
↓ open down ↓ 215 lines elided ↑ open up ↑
 216  216   */
 217  217  static int
 218  218  i40e_m_promisc(void *arg, boolean_t on)
 219  219  {
 220  220          i40e_t *i40e = arg;
 221  221          struct i40e_hw *hw = &i40e->i40e_hw_space;
 222  222          int ret = 0, err = 0;
 223  223  
 224  224          mutex_enter(&i40e->i40e_general_lock);
 225  225          if (i40e->i40e_state & I40E_SUSPENDED) {
 226      -                ret = ECANCELED;
      226 +                err = ECANCELED;
 227  227                  goto done;
 228  228          }
 229  229  
 230  230  
 231  231          ret = i40e_aq_set_vsi_unicast_promiscuous(hw, I40E_DEF_VSI_SEID(i40e),
 232      -            on, NULL, B_FALSE);
      232 +            on, NULL, B_TRUE);
 233  233          if (ret != I40E_SUCCESS) {
 234  234                  i40e_error(i40e, "failed to %s unicast promiscuity on "
 235  235                      "the default VSI: %d", on == B_TRUE ? "enable" : "disable",
 236  236                      ret);
 237  237                  err = EIO;
 238  238                  goto done;
 239  239          }
 240  240  
 241  241          /*
 242  242           * If we have a non-zero mcast_promisc_count, then it has already been
↓ open down ↓ 9 lines elided ↑ open up ↑
 252  252          if (ret != I40E_SUCCESS) {
 253  253                  i40e_error(i40e, "failed to %s multicast promiscuity on "
 254  254                      "the default VSI: %d", on == B_TRUE ? "enable" : "disable",
 255  255                      ret);
 256  256  
 257  257                  /*
 258  258                   * Try our best to put us back into a state that MAC expects us
 259  259                   * to be in.
 260  260                   */
 261  261                  ret = i40e_aq_set_vsi_unicast_promiscuous(hw,
 262      -                    I40E_DEF_VSI_SEID(i40e), !on, NULL, B_FALSE);
      262 +                    I40E_DEF_VSI_SEID(i40e), !on, NULL, B_TRUE);
 263  263                  if (ret != I40E_SUCCESS) {
 264  264                          i40e_error(i40e, "failed to %s unicast promiscuity on "
 265  265                              "the default VSI after toggling multicast failed: "
 266  266                              "%d", on == B_TRUE ? "disable" : "enable", ret);
 267  267                  }
 268  268  
 269  269                  err = EIO;
 270  270                  goto done;
 271  271          } else {
 272  272                  i40e->i40e_promisc_on = on;
↓ open down ↓ 1183 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX