From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0A0DD1B583; Wed, 17 Apr 2019 04:00:09 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Apr 2019 19:00:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,360,1549958400"; d="scan'208";a="132028478" Received: from unknown (HELO npg-dpdk-cvl-yingwang-117d94.sh.intel.com) ([10.67.117.94]) by orsmga007.jf.intel.com with ESMTP; 16 Apr 2019 19:00:05 -0700 From: Wang Ying A To: wenzhuo.lu@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, ramirose@gmail.com, Wang Ying A , stable@dpdk.org Date: Wed, 17 Apr 2019 09:47:52 +0800 Message-Id: <1555465672-288172-3-git-send-email-ying.a.wang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1555465672-288172-1-git-send-email-ying.a.wang@intel.com> References: <1555077139-244831-2-git-send-email-ying.a.wang@intel.com> <1555465672-288172-1-git-send-email-ying.a.wang@intel.com> Subject: [dpdk-dev] [PATCH v2 2/2] net/ice: fix 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: Wed, 17 Apr 2019 02:00:10 -0000 When device promiscuous mode has already been enabled, should not return error if user re-enable it. Fixes: c945e4bf9063 ("net/ice: support promiscuous mode") Cc: stable@dpdk.org Signed-off-by: Wang Ying A --- drivers/net/ice/ice_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 3263337..8811057 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2763,7 +2763,9 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; status = ice_set_vsi_promisc(hw, vsi->idx, pmask, 0); - if (status != ICE_SUCCESS) + if (status == ICE_ERR_ALREADY_EXISTS) + PMD_DRV_LOG(DEBUG, "Promisc mode has already been enabled"); + else if (status != ICE_SUCCESS) PMD_DRV_LOG(ERR, "Failed to enable promisc, err=%d", status); } -- 1.8.3.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id E522BA00E6 for ; Wed, 17 Apr 2019 04:00:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B3D791B593; Wed, 17 Apr 2019 04:00:11 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0A0DD1B583; Wed, 17 Apr 2019 04:00:09 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Apr 2019 19:00:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,360,1549958400"; d="scan'208";a="132028478" Received: from unknown (HELO npg-dpdk-cvl-yingwang-117d94.sh.intel.com) ([10.67.117.94]) by orsmga007.jf.intel.com with ESMTP; 16 Apr 2019 19:00:05 -0700 From: Wang Ying A To: wenzhuo.lu@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, ramirose@gmail.com, Wang Ying A , stable@dpdk.org Date: Wed, 17 Apr 2019 09:47:52 +0800 Message-Id: <1555465672-288172-3-git-send-email-ying.a.wang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1555465672-288172-1-git-send-email-ying.a.wang@intel.com> References: <1555077139-244831-2-git-send-email-ying.a.wang@intel.com> <1555465672-288172-1-git-send-email-ying.a.wang@intel.com> Subject: [dpdk-dev] [PATCH v2 2/2] net/ice: fix 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190417014752.0Af_K01zwq19ygtOiQFnfi7uDtwOa8vsGZ28HlYuIrY@z> When device promiscuous mode has already been enabled, should not return error if user re-enable it. Fixes: c945e4bf9063 ("net/ice: support promiscuous mode") Cc: stable@dpdk.org Signed-off-by: Wang Ying A --- drivers/net/ice/ice_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 3263337..8811057 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2763,7 +2763,9 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; status = ice_set_vsi_promisc(hw, vsi->idx, pmask, 0); - if (status != ICE_SUCCESS) + if (status == ICE_ERR_ALREADY_EXISTS) + PMD_DRV_LOG(DEBUG, "Promisc mode has already been enabled"); + else if (status != ICE_SUCCESS) PMD_DRV_LOG(ERR, "Failed to enable promisc, err=%d", status); } -- 1.8.3.1