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 F4232A04E7; Mon, 2 Nov 2020 13:18:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 387A3C842; Mon, 2 Nov 2020 13:18:51 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 5081BC840 for ; Mon, 2 Nov 2020 13:18:47 +0100 (CET) IronPort-SDR: Ei1UpUikyhjqZ3t9W3Lrp0lcRcmqZ4n5UXNdtrkifUHzxFUc8hKxtFCrp/DBgpwpV9TwSKGxQv nkTMhFFfkF3w== X-IronPort-AV: E=McAfee;i="6000,8403,9792"; a="230505780" X-IronPort-AV: E=Sophos;i="5.77,444,1596524400"; d="scan'208";a="230505780" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2020 04:18:46 -0800 IronPort-SDR: pinwj8x3xS0zeeUlfY+gPG/H/4kglljXbs+MfVaru8zsz9wy4uTcFgpgK3a2XFh+yHhvbb1Lvc 5JDhpJITZ+5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,444,1596524400"; d="scan'208";a="336149778" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga002.jf.intel.com with ESMTP; 02 Nov 2020 04:18:46 -0800 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 2 Nov 2020 04:18:45 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 2 Nov 2020 20:18:43 +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; Mon, 2 Nov 2020 20:18:43 +0800 From: "Zhang, Qi Z" To: "Su, Simei" CC: "dev@dpdk.org" , "Guo, Junfeng" , "Guo, Jia" Thread-Topic: [PATCH v4] net/iavf: fix invalid RSS type Thread-Index: AQHWsRBIOebJdZ+4BEKdHdGWO2XlSqm0wTeA Date: Mon, 2 Nov 2020 12:18:43 +0000 Message-ID: <32c3197e4b2f4a1996a553eb5b6b9ff2@intel.com> References: <20201102113948.259870-1-simei.su@intel.com> <20201102115547.262237-1-simei.su@intel.com> In-Reply-To: <20201102115547.262237-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.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4] 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: Monday, November 2, 2020 7:56 PM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Guo, Junfeng ; Guo, Jia > ; Su, Simei > Subject: [PATCH v4] 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. Need to specify l3/l4 SRC/DST_ONLY=20 >=20 > Fixes: 91f27b2e39ab ("net/iavf: refactor RSS") >=20 > Signed-off-by: Simei Su >=20 > v4: > * Simplify code to be more readable. >=20 > v3: > * Correct invalid case. >=20 > v2: > * Move invalid check into "iavf_any_invalid_rss_type". Version tracking should not be part of the commit log. > --- > drivers/net/iavf/iavf_hash.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c = index > be821b6..915b7c5 100644 > --- a/drivers/net/iavf/iavf_hash.c > +++ b/drivers/net/iavf/iavf_hash.c > @@ -834,10 +834,21 @@ static struct rss_attr_type rss_attr_to_valid_type[= ] =3D > { }; >=20 > static bool > -iavf_any_invalid_rss_type(uint64_t rss_type, uint64_t allow_rss_type) > +iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func, > + uint64_t rss_type, uint64_t allow_rss_type) > { > uint32_t i; >=20 > + /** > + * Check if SRC/DST_ONLY is set for SYMMETRIC_TOEPLITZ > + * hash function. Need to specifyl3/l4 SRC/DST_ONLY > + */ > + if (rss_func =3D=3D RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) { > + if (rss_type & (ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY | > + ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY)) > + return true; > + } > + > /* check invalid combination */ > for (i =3D 0; i < RTE_DIM(invalid_rss_comb); i++) { > if (__builtin_popcountll(rss_type & invalid_rss_comb[i]) > 1) @@ > -917,7 +928,7 @@ iavf_hash_parse_action(struct iavf_pattern_match_item > *match_item, > */ > rss_type =3D rte_eth_rss_hf_refine(rss_type); >=20 > - if (iavf_any_invalid_rss_type(rss_type, > + if (iavf_any_invalid_rss_type(rss->func, rss_type, > match_item->input_set_mask)) > return rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ACTION, > -- > 2.9.5 Besides above minor captures Acked-by: Qi Zhang Applied to dpdk-next-net-intel after fix those captures. Thanks Qi