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 D8381A0526; Thu, 9 Jul 2020 08:46:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A92EC1DB93; Thu, 9 Jul 2020 08:46:40 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 58EE71DA96 for ; Thu, 9 Jul 2020 08:46:39 +0200 (CEST) IronPort-SDR: M+Qn+LpCgicOX3A6gmRKn3R4yU9MRAkNeEytpOpFfQxs2s5odzhqwM8HyEETg1lBUXDkyyPf5Y q/YYGR117VVA== X-IronPort-AV: E=McAfee;i="6000,8403,9676"; a="146037123" X-IronPort-AV: E=Sophos;i="5.75,330,1589266800"; d="scan'208";a="146037123" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 23:46:38 -0700 IronPort-SDR: SdDPD4NmBk3X5Uu6krhcnn1wJgi5q2mI571xtrft0WOBoGZ8uOmySfmv73Kj/6azpyXjY80nKJ f5YW+RW1xejg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,330,1589266800"; d="scan'208";a="306319329" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 08 Jul 2020 23:46:38 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 8 Jul 2020 23:46:38 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 8 Jul 2020 23:46:37 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.22]) by shsmsx102.ccr.corp.intel.com ([169.254.2.43]) with mapi id 14.03.0439.000; Thu, 9 Jul 2020 14:46:34 +0800 From: "Zhang, Qi Z" To: "Su, Simei" CC: "dev@dpdk.org" , "Guo, Jia" Thread-Topic: [PATCH] net/ice: fix invalid RSS type Thread-Index: AQHWVboWJKCrp+6/Z06y3NcfMBKyCKj+zYLw Date: Thu, 9 Jul 2020 06:46:33 +0000 Message-ID: <039ED4275CED7440929022BC67E70611548594D2@SHSMSX103.ccr.corp.intel.com> References: <1594275994-318254-1-git-send-email-simei.su@intel.com> In-Reply-To: <1594275994-318254-1-git-send-email-simei.su@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ice: fix invalid RSS type 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" > -----Original Message----- > From: Su, Simei > Sent: Thursday, July 9, 2020 2:27 PM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Guo, Jia ; Su, Simei > > Subject: [PATCH] net/ice: fix invalid RSS type >=20 > When a RSS rule with only RSS type modifirer L2/L3/L4 SRC/DST_ONLY, it > should return failure. This patch adds invalid RSS type check. >=20 > Fixes: dfaedcf20170 ("net/ice: refactor PF hash flow") >=20 > Signed-off-by: Simei Su > --- > drivers/net/ice/ice_hash.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c inde= x > cbd6116..777bd6d 100644 > --- a/drivers/net/ice/ice_hash.c > +++ b/drivers/net/ice/ice_hash.c > @@ -721,6 +721,11 @@ struct ice_hash_match_type ice_hash_type_list[] =3D = { > * of the same level. > */ > rss_type =3D rte_eth_rss_hf_refine(rss_type); > + /* Check if only L2/L3/L4 src/dst-only exists. */ > + if ((rss_type & 0xffffffff) =3D=3D 0) Why 0xffffffff? We should not hard code. > + return rte_flow_error_set(error, ENOTSUP, > + RTE_FLOW_ERROR_TYPE_ACTION, action, > + "rss type with only L2/L3/L4 src/dst only is invalid"); >=20 > combine_type =3D ETH_RSS_L2_SRC_ONLY | > ETH_RSS_L2_DST_ONLY | > -- > 1.8.3.1