From patchwork Sun Sep 27 07:26:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Zhang X-Patchwork-Id: 78906 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.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 ; 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 To: dev@dpdk.org Cc: beilei.xing@intel.com, jingjing.wu@intel.com, qiming.yang@intel.com, stevex.yang@intel.com, Robin Zhang 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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;