From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 842D3A04BC;
	Sun, 27 Sep 2020 09:48:01 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 4966C1D902;
	Sun, 27 Sep 2020 09:47:26 +0200 (CEST)
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id 930DC1D8DD
 for <dev@dpdk.org>; Sun, 27 Sep 2020 09:47:23 +0200 (CEST)
IronPort-SDR: Fn0IMWe5Qhv+uNtYnTgS7IWOsday83tHru+I17SDeAwDyabt5aO+IZ2tekFRWf70Q0X4serg1P
 zXoejhH9qZhg==
X-IronPort-AV: E=McAfee;i="6000,8403,9756"; a="223438300"
X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="223438300"
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 27 Sep 2020 00:47:22 -0700
IronPort-SDR: ScKPEoUt8veOI4C1vicqWGV3avotGzGwvK8Vma7c6jOIaafWr1EsT+qyXK5ktYjrJayPvytClL
 SDyA8qhENZ0Q==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.77,309,1596524400"; d="scan'208";a="323939381"
Received: from intel-npg-odc-srv03.cd.intel.com ([10.240.178.138])
 by orsmga002.jf.intel.com with ESMTP; 27 Sep 2020 00:47:20 -0700
From: Robin Zhang <robinx.zhang@intel.com>
To: dev@dpdk.org
Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com,
 stevex.yang@intel.com, Robin Zhang <robinx.zhang@intel.com>
Date: Sun, 27 Sep 2020 07:26:21 +0000
Message-Id: <20200927072626.28374-4-robinx.zhang@intel.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20200927072626.28374-1-robinx.zhang@intel.com>
References: <20200927072626.28374-1-robinx.zhang@intel.com>
Subject: [dpdk-dev] [PATCH 3/8] net/iavf: re-program promiscuous mode on VF
	interface
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

During a kernel PF reset, this event is propagated to the VF.
The DPDK VF PMD will execute the reset task before the PF is done
with his. This results in the admin queue message not being responded
to leaving the port in "promiscuous" mode.

This patch makes sure the promiscuous mode is configured independently
of the current admin state.

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index d21e35c17..57640c52a 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -678,9 +678,6 @@ iavf_dev_promiscuous_enable(struct rte_eth_dev *dev)
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	int ret;
 
-	if (vf->promisc_unicast_enabled)
-		return 0;
-
 	ret = iavf_config_promisc(adapter, true, vf->promisc_multicast_enabled);
 	if (!ret)
 		vf->promisc_unicast_enabled = true;
@@ -700,9 +697,6 @@ iavf_dev_promiscuous_disable(struct rte_eth_dev *dev)
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	int ret;
 
-	if (!vf->promisc_unicast_enabled)
-		return 0;
-
 	ret = iavf_config_promisc(adapter, false,
 				  vf->promisc_multicast_enabled);
 	if (!ret)
@@ -723,9 +717,6 @@ iavf_dev_allmulticast_enable(struct rte_eth_dev *dev)
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	int ret;
 
-	if (vf->promisc_multicast_enabled)
-		return 0;
-
 	ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, true);
 	if (!ret)
 		vf->promisc_multicast_enabled = true;
@@ -745,9 +736,6 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev)
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	int ret;
 
-	if (!vf->promisc_multicast_enabled)
-		return 0;
-
 	ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, false);
 	if (!ret)
 		vf->promisc_multicast_enabled = false;
-- 
2.17.1