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 3895CA04DF; Fri, 30 Oct 2020 10:48:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C3DBAD6F; Fri, 30 Oct 2020 10:41:25 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id D9D7DA9A0 for ; Fri, 30 Oct 2020 10:41:23 +0100 (CET) IronPort-SDR: KXT3w4PVXDhYCJGqXXznWfzoUCoijwRt87gHUItDffAa/uqJykjws2SsO+gH53GZpB85FJgc+N t9nK9z77yALA== X-IronPort-AV: E=McAfee;i="6000,8403,9789"; a="148439279" X-IronPort-AV: E=Sophos;i="5.77,432,1596524400"; d="scan'208";a="148439279" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 02:41:22 -0700 IronPort-SDR: VYEALyf6LRKDsVy0WxYf14vsGI9ZMrlK8b938QsgyBiyEUj9TcCKLsJQTUSh7o7T33nGBoiBxk oKwdfmU43fmA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,432,1596524400"; d="scan'208";a="361797590" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by FMSMGA003.fm.intel.com with ESMTP; 30 Oct 2020 02:41:22 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) 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.1713.5; Fri, 30 Oct 2020 02:41:21 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 30 Oct 2020 17:41:19 +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.1713.004; Fri, 30 Oct 2020 17:41:19 +0800 From: "Zhang, Qi Z" To: "Su, Simei" CC: "dev@dpdk.org" , "Guo, Jia" , "Guo, Junfeng" Thread-Topic: [PATCH] net/iavf: fix invalid RSS type Thread-Index: AQHWrmxyOcirDj+DX0+j5umnUF15samv5Jqg Date: Fri, 30 Oct 2020 09:41:19 +0000 Message-ID: <466af3c9e05d44cfa39a8b80ac834ff9@intel.com> References: <20201030031638.370766-1-simei.su@intel.com> In-Reply-To: <20201030031638.370766-1-simei.su@intel.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.108.32.68] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/iavf: 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: Friday, October 30, 2020 11:17 AM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Guo, Jia ; Guo, Junfeng > ; Su, Simei > Subject: [PATCH] net/iavf: fix invalid RSS type >=20 > When a RSS rule with symmetric hash function, the RSS type shouldn't carr= y > with SRC/DST_ONLY. This patch adds invalid RSS type check for the case. >=20 > Fixes: 91f27b2e39ab ("net/iavf: refactor RSS") >=20 > Signed-off-by: Simei Su > --- > drivers/net/iavf/iavf_hash.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) >=20 > diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c = index > be821b6..6d0360a 100644 > --- a/drivers/net/iavf/iavf_hash.c > +++ b/drivers/net/iavf/iavf_hash.c > @@ -917,6 +917,22 @@ iavf_hash_parse_action(struct > iavf_pattern_match_item *match_item, > */ > rss_type =3D rte_eth_rss_hf_refine(rss_type); >=20 > + /** > + * Check if SRC/DST_ONLY is set for SYMMETRIC_TOEPLITZ > + * hash function. > + */ > + if (rss->func =3D=3D > + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) { > + if (rss_type & ((VALID_RSS_ATTR & > + ~RTE_ETH_RSS_L3_PRE64) | > + ~(VALID_RSS_IPV4 | VALID_RSS_IPV6))) > + return rte_flow_error_set(error, > + ENOTSUP, > + RTE_FLOW_ERROR_TYPE_ACTION, > + action, > + "invalid rss types"); > + } Better to move above check into the below "iavf_any_invalid_rss_type" > + > if (iavf_any_invalid_rss_type(rss_type, > match_item->input_set_mask)) > return rte_flow_error_set(error, ENOTSUP, > -- > 2.9.5