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 9148CA04C9; Tue, 11 Aug 2020 10:10:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 437971C0AE; Tue, 11 Aug 2020 10:09:56 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 9C7F71C0AC for ; Tue, 11 Aug 2020 10:09:54 +0200 (CEST) IronPort-SDR: PmlqjDB1MtuWV7QHIX7wD4JKgqVrlVmdzTIkl0bzahFMkYVVei/zBYZbpfRd8pEmNoQLBRpFd2 KR/rzsMvvI7Q== X-IronPort-AV: E=McAfee;i="6000,8403,9709"; a="133226889" X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="133226889" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 01:09:53 -0700 IronPort-SDR: UclkxmOqEpylmSCgO53zztMKwlIGdnBSapHl9lPePqMuMbb0auwVOuvgkebw6k3zqif2Wsv5u2 ptEhQ2f0T4Aw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,460,1589266800"; d="scan'208";a="308335334" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.134]) by orsmga002.jf.intel.com with ESMTP; 11 Aug 2020 01:09:52 -0700 From: SteveX Yang To: jingjing.wu@intel.com, beilei.xing@intel.com, dev@dpdk.org Cc: qiming.yang@intel.com, SteveX Yang Date: Tue, 11 Aug 2020 07:59:06 +0000 Message-Id: <20200811075910.20954-4-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200811075910.20954-1-stevex.yang@intel.com> References: <20200811075910.20954-1-stevex.yang@intel.com> Subject: [dpdk-dev] [PATCH 3/7] net/iavf: fix port start during configuration restore 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" If configuring VF promiscuous mode is not supported, return -ENOTSUP error code in .promiscuous_enable/disable dev_ops. This is to fix the port start during configuration restore, where if .promiscuous_enable/disable dev_ops exists and return any value other than -ENOTSUP, start will fail. Same is done for .allmulticast_enable/disable dev_ops. Fixes: ca041cd44fcc ("ethdev: change allmulticast callbacks to return status") Fixes: 9039c8125730 ("ethdev: change promiscuous callbacks to return status") Signed-off-by: SteveX Yang --- drivers/net/iavf/iavf_ethdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index ae508f2f0..349c82cae 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -648,6 +648,8 @@ iavf_dev_promiscuous_enable(struct rte_eth_dev *dev) ret = iavf_config_promisc(adapter, true, vf->promisc_multicast_enabled); if (!ret) vf->promisc_unicast_enabled = true; + else if (ret == IAVF_NOT_SUPPORTED) + ret = -ENOTSUP; else ret = -EAGAIN; @@ -669,6 +671,8 @@ iavf_dev_promiscuous_disable(struct rte_eth_dev *dev) vf->promisc_multicast_enabled); if (!ret) vf->promisc_unicast_enabled = false; + else if (ret == IAVF_NOT_SUPPORTED) + ret = -ENOTSUP; else ret = -EAGAIN; @@ -689,6 +693,8 @@ iavf_dev_allmulticast_enable(struct rte_eth_dev *dev) ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, true); if (!ret) vf->promisc_multicast_enabled = true; + else if (ret == IAVF_NOT_SUPPORTED) + ret = -ENOTSUP; else ret = -EAGAIN; @@ -709,6 +715,8 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev) ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, false); if (!ret) vf->promisc_multicast_enabled = false; + else if (ret == IAVF_NOT_SUPPORTED) + ret = -ENOTSUP; else ret = -EAGAIN; -- 2.17.1