From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 47A86A0564; Fri, 28 Feb 2020 04:29:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6CB391BFAB; Fri, 28 Feb 2020 04:29:28 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 04C9F1F1C; Fri, 28 Feb 2020 04:29:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2020 19:29:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,493,1574150400"; d="scan'208";a="238636719" Received: from npg-dpdk-zhangxiao.sh.intel.com ([10.67.110.203]) by orsmga003.jf.intel.com with ESMTP; 27 Feb 2020 19:29:23 -0800 From: Xiao Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, qi.z.zhang@intel.com, Xiao Zhang , stable@dpdk.org Date: Fri, 28 Feb 2020 11:22:04 +0800 Message-Id: <1582860124-48237-1-git-send-email-xiao.zhang@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] net/i40e: add promiscuous configure unsupported check 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" Return ENOTSUP error code when configuring i40evf promiscuous mode to fix port start hang issue on platforms which are unsupported to configure promiscuous mode. Fixes: ddc7cb0d9453 ("net/i40e: re-program promiscuous mode on VF interface") Cc: stable@dpdk.org Signed-off-by: Xiao 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 c34f520..244397e 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2191,6 +2191,8 @@ i40evf_dev_promiscuous_enable(struct rte_eth_dev *dev) ret = i40evf_config_promisc(dev, 1, vf->promisc_multicast_enabled); if (ret == 0) vf->promisc_unicast_enabled = TRUE; + else if (ret == I40E_NOT_SUPPORTED) + ret = -ENOTSUP; else ret = -EAGAIN; @@ -2206,6 +2208,8 @@ i40evf_dev_promiscuous_disable(struct rte_eth_dev *dev) ret = i40evf_config_promisc(dev, 0, vf->promisc_multicast_enabled); if (ret == 0) vf->promisc_unicast_enabled = FALSE; + else if (ret == I40E_NOT_SUPPORTED) + ret = -ENOTSUP; else ret = -EAGAIN; @@ -2221,6 +2225,8 @@ i40evf_dev_allmulticast_enable(struct rte_eth_dev *dev) ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 1); if (ret == 0) vf->promisc_multicast_enabled = TRUE; + else if (ret == I40E_NOT_SUPPORTED) + ret = -ENOTSUP; else ret = -EAGAIN; @@ -2236,6 +2242,8 @@ i40evf_dev_allmulticast_disable(struct rte_eth_dev *dev) ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 0); if (ret == 0) vf->promisc_multicast_enabled = FALSE; + else if (ret == I40E_NOT_SUPPORTED) + ret = -ENOTSUP; else ret = -EAGAIN; -- 2.7.4