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 E7243A0548; Tue, 20 Apr 2021 16:08:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D00EF41801; Tue, 20 Apr 2021 16:08:09 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 04C2B41735; Tue, 20 Apr 2021 16:08:06 +0200 (CEST) IronPort-SDR: UJuFFi4jAEalFKt4p/18xh4Fu1HGmFzgtp2aDenWBE3idAZAEG7Y4V2O3vzF/sE2FPH3vaqUSw ojZdd5HKyV6g== X-IronPort-AV: E=McAfee;i="6200,9189,9960"; a="175617519" X-IronPort-AV: E=Sophos;i="5.82,237,1613462400"; d="scan'208";a="175617519" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2021 07:08:06 -0700 IronPort-SDR: qGB+PtbhFHTLRry8A+L4vHyFUCFfLWW9AUalUw+1a6L8tJe+P0E/RwvMD8Y9lKOIik/sGK8nlw Uq/Rx/5dTj+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,237,1613462400"; d="scan'208";a="613770843" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga006.fm.intel.com with ESMTP; 20 Apr 2021 07:08:06 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 20 Apr 2021 07:08:05 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 20 Apr 2021 22:08:03 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2106.013; Tue, 20 Apr 2021 22:08:03 +0800 From: "Zhang, Qi Z" To: Siwar Zitouni , "dev@dpdk.org" CC: "Yang, Qiming" , "Lu, Wenzhuo" , "stable@dpdk.org" , Thibaut Collet Thread-Topic: [PATCH] net/ice: fix disabling of promisc mode (keep allmulti state) Thread-Index: AQHXNRsSR66GWtA5d0W5cwOkQwgjI6q9ccMw Date: Tue, 20 Apr 2021 14:08:03 +0000 Message-ID: References: <20210419125348.25109-1-siwar.zitouni@6wind.com> In-Reply-To: <20210419125348.25109-1-siwar.zitouni@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" > -----Original Message----- > From: Siwar Zitouni > Sent: Monday, April 19, 2021 8:54 PM > To: dev@dpdk.org > Cc: Yang, Qiming ; Zhang, Qi Z > ; Lu, Wenzhuo ; Siwar Zitouni > ; stable@dpdk.org; Thibaut Collet > > Subject: [PATCH] net/ice: fix disabling of promisc mode (keep allmulti st= ate) >=20 > When promiscuous mode is disabled, allmulticast is also disabled, even if= it was > previously enabled. >=20 > Add a test in ice_promisc_disable() > to check if allmulticast should be kept enabled. >=20 > Fixes: c945e4bf9063 ("net/ice: support promiscuous mode") > Cc: stable@dpdk.org >=20 > Signed-off-by: Thibaut Collet > Signed-off-by: Siwar Zitouni > --- > drivers/net/ice/ice_ethdev.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > 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 =3D 0; >=20 > - pmask =3D ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX | > - ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; > + if (dev->data->all_multicast =3D=3D 1) > + pmask =3D ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX; > + else > + pmask =3D ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX | > + ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; >=20 > status =3D ice_clear_vsi_promisc(hw, vsi->idx, pmask, 0); > if (status !=3D ICE_SUCCESS) { > -- > 2.30.2 Acked-by: Qi Zhang Applied to dpdk-next-net-intel. Thanks Qi