From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 118D33238; Sat, 28 Apr 2018 13:37:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Apr 2018 04:37:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,338,1520924400"; d="scan'208";a="46739880" Received: from dpdkx8602.sh.intel.com ([10.67.110.200]) by orsmga003.jf.intel.com with ESMTP; 28 Apr 2018 04:37:40 -0700 From: Rosen Xu To: dev@dpdk.org Cc: helin.zhang@intel.com, qi.z.zhang@intel.com, jingjing.wu@intel.com, stable@dpdk.org Date: Sat, 28 Apr 2018 19:38:53 +0800 Message-Id: <1524915533-96768-1-git-send-email-rosen.xu@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1521090873-50595-1-git-send-email-rosen.xu@intel.com> References: <1521090873-50595-1-git-send-email-rosen.xu@intel.com> Subject: [dpdk-dev] [PATCH v5] net/i40e: fix disabling promiscuous mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2018 11:37:43 -0000 v5 updates: =========== - Modificate some comments for this patch 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. Fixes: 4861cde46116 ("i40e: new poll mode driver") Cc: stable@dpdk.org Signed-off-by: Rosen Xu Acked-by: Qi Zhang --- 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 48e7ac2..b8977a6 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 fixes missing disable promiscuous mode + * when work with kernel dirver bug issue + */ + 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