when execute tcpdump , the interface will turn on promisc first. if it's an i40e interface, the interface will be reset, so packets lost. my driver version is 1.5.16, in file "i40e_main.c" line 2144, could I delete the code marked, to avoid packets lost , as I never use any virtualization capabilitie ? if ((changed_flags & IFF_PROMISC) || promisc_forced_on) { bool cur_promisc;
cur_promisc = (!!(vsi->current_netdev_flags & IFF_PROMISC) || test_bit(__I40E_FILTER_OVERFLOW_PROMISC, &vsi->state)); if ((vsi->type == I40E_VSI_MAIN) && (pf->lan_veb != I40E_NO_VEB) && !(pf->flags & I40E_FLAG_MFP_ENABLED)) { /* set defport ON for Main VSI instead of true promisc * this way we will get all unicast/multicast and vlan * promisc behavior but will not get VF or VMDq traffic * replicated on the Main VSI. */ if (pf->cur_promisc != cur_promisc) { pf->cur_promisc = cur_promisc; set_bit(__I40E_PF_RESET_REQUESTED, &pf->state); } } else { aq_ret = i40e_aq_set_vsi_unicast_promiscuous( &vsi->back->hw, vsi->seid, cur_promisc, NULL, true); if (aq_ret) { retval = i40e_aq_rc_to_posix(aq_ret, pf->hw.aq.asq_last_status); dev_info(&pf->pdev->dev, "set unicast promisc failed, err %s, aq_err %s\n", i40e_stat_str(&pf->hw, aq_ret), i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status)); } aq_ret = i40e_aq_set_vsi_multicast_promiscuous( &vsi->back->hw, vsi->seid, cur_promisc, NULL); if (aq_ret) { retval = i40e_aq_rc_to_posix(aq_ret, pf->hw.aq.asq_last_status); dev_info(&pf->pdev->dev, "set multicast promisc failed, err %s, aq_err %s\n", i40e_stat_str(&pf->hw, aq_ret), i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status)); } } haobo_d...@netentsec.com
------------------------------------------------------------------------------
_______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired