From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rosen Xu Subject: [PATCH v4] drivers/net/i40e: fix missing promiscuous disable at device disable Date: Wed, 18 Apr 2018 16:11:41 +0800 Message-ID: <1524039101-158658-1-git-send-email-rosen.xu@intel.com> References: <1521090873-50595-1-git-send-email-rosen.xu@intel.com> Cc: beilei.xing@intel.com, helin.zhang@intel.com, qi.z.zhang@intel.com, jingjing.wu@intel.com To: dev@dpdk.org Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2FE0F7DEC for ; Wed, 18 Apr 2018 10:09:51 +0200 (CEST) In-Reply-To: <1521090873-50595-1-git-send-email-rosen.xu@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" v4 updates: =========== - Add some comments for this patch v3 updates: =========== - Move modification from device close to device disable - i40evf_reset_vf() will cause kernel driver enable all vlan promiscuous, so unicast/multicast promiscuous disable should set before reset. v2 updates: =========== - Add more comments In scenario of Kernel Driver runs on PF and PMD runs on VF, PMD exit doesn't disable promiscuous mode, this will cause vlan filter set by Kernel Driver will not take effect. This patch will fix it, add promiscuous disable at device disable. Signed-off-by: Rosen Xu --- drivers/net/i40e/i40e_ethdev_vf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 031c706..91fbf6c 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2288,6 +2288,14 @@ static int eth_i40evf_pci_remove(struct rte_pci_device *pci_dev) i40evf_dev_stop(dev); i40e_dev_free_queues(dev); + /* + * disable promiscuous mode before reset vf + * it is a workaround solution when work with kernel driver + * and it is not the normal way + */ + i40evf_dev_promiscuous_disable(dev); + i40evf_dev_allmulticast_disable(dev); + i40evf_reset_vf(hw); i40e_shutdown_adminq(hw); /* disable uio intr before callback unregister */ -- 1.8.3.1