From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 153C6A0524; Mon, 19 Apr 2021 14:53:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C53041283; Mon, 19 Apr 2021 14:53:52 +0200 (CEST) Received: from proxy.6wind.com (host.78.145.23.62.rev.coltfrance.com [62.23.145.78]) by mails.dpdk.org (Postfix) with ESMTP id 200554123B; Mon, 19 Apr 2021 14:53:52 +0200 (CEST) Received: from madball.dev.6wind.com (unknown [10.16.0.116]) by proxy.6wind.com (Postfix) with ESMTP id EFA8E931F53; Mon, 19 Apr 2021 14:53:51 +0200 (CEST) From: Siwar Zitouni To: dev@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, wenzhuo.lu@intel.com, Siwar Zitouni , stable@dpdk.org, Thibaut Collet Date: Mon, 19 Apr 2021 14:53:48 +0200 Message-Id: <20210419125348.25109-1-siwar.zitouni@6wind.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/ice: fix disabling of promisc mode (keep allmulti state) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" When promiscuous mode is disabled, allmulticast is also disabled, even if it was previously enabled. Add a test in ice_promisc_disable() to check if allmulticast should be kept enabled. Fixes: c945e4bf9063 ("net/ice: support promiscuous mode") Cc: stable@dpdk.org Signed-off-by: Thibaut Collet Signed-off-by: Siwar Zitouni --- drivers/net/ice/ice_ethdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 84d173525..da9e85bd7 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -4526,8 +4526,11 @@ ice_promisc_disable(struct rte_eth_dev *dev) uint8_t pmask; int ret = 0; - pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX | - ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; + if (dev->data->all_multicast == 1) + pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX; + else + pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX | + ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; status = ice_clear_vsi_promisc(hw, vsi->idx, pmask, 0); if (status != ICE_SUCCESS) { -- 2.30.2