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 2BC57A052A; Wed, 23 Dec 2020 09:15:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 020A5CA4A; Wed, 23 Dec 2020 09:15:03 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 94F22CA36 for ; Wed, 23 Dec 2020 09:15:01 +0100 (CET) IronPort-SDR: xpUIPBYgU6YRN3nDZyvvzb/976JB3nrfcleu7hwS0lW6vg374J6XbqmT3VPUvW7Z3+1ApoEjjD 4yuxoVOuvhrg== X-IronPort-AV: E=McAfee;i="6000,8403,9843"; a="176128127" X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208";a="176128127" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2020 00:14:59 -0800 IronPort-SDR: 8zkh4x/1Q4jKKDm3liDQn/m7qZg3JTcrj2Q0F+am+aaqljkWxBEOXOeKaiPK/VIIw9odjlwkqw ckwse/NKhnpg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208";a="373878203" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga008.jf.intel.com with ESMTP; 23 Dec 2020 00:14:59 -0800 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 23 Dec 2020 00:14:58 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 23 Dec 2020 16:14:56 +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; Wed, 23 Dec 2020 16:14:56 +0800 From: "Guo, Jia" To: "Yang, MurphyX" , "dev@dpdk.org" CC: "Yang, Qiming" , "Zhang, Qi Z" , "Yang, SteveX" , "Wu, Jingjing" , "Xing, Beilei" , "Yang, MurphyX" Thread-Topic: [PATCH v4] net/iavf: fix invalid RSS combinations rule can be created Thread-Index: AQHW2QKvhrYQvE/xREuVMqVv+Owr9aoEVUgA Date: Wed, 23 Dec 2020 08:14:56 +0000 Message-ID: References: <20201223062120.76293-1-murphyx.yang@intel.com> <20201223080346.79009-1-murphyx.yang@intel.com> In-Reply-To: <20201223080346.79009-1-murphyx.yang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 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 combinations rule can be created 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" Acked-by: Jeff Guo > -----Original Message----- > From: Murphy Yang > Sent: Wednesday, December 23, 2020 4:04 PM > To: dev@dpdk.org > Cc: Yang, Qiming ; Guo, Jia ; > Zhang, Qi Z ; Yang, SteveX ; > Wu, Jingjing ; Xing, Beilei ; > Yang, MurphyX > Subject: [PATCH v4] net/iavf: fix invalid RSS combinations rule can be cr= eated >=20 > Currently, when use 'flow' command to create a rule that combine with > several RSS types, even the RSS type combination is invalid, it also be c= reated > successfully. >=20 > Here list some invalid RSS combinations: > - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP > - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP > - ETH_RSS_GTPU | ETH_RSS_IPV4 > - ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP > - ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP > - ETH_RSS_GTPU | ETH_RSS_IPV6 > - ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP > - ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP >=20 > So, this patch adds these combinations in 'invalid_rss_comb' > array to do valid check, if the combination check failed, the rule will b= e > created unsuccessful. >=20 > Fixes: 91f27b2e39ab ("net/iavf: refactor RSS") >=20 > Signed-off-by: Murphy Yang > --- > v4: > - use 'ETH_RSS_XXX' replace 'IAVF_RSS_TYPE_INNER_XXX' > v3: > - update the comments. > v2: > - add invalid RSS combinations. >=20 > drivers/net/iavf/iavf_hash.c | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c = index > c4c73e6644..3ed72f6475 100644 > --- a/drivers/net/iavf/iavf_hash.c > +++ b/drivers/net/iavf/iavf_hash.c > @@ -806,7 +806,15 @@ static void iavf_refine_proto_hdrs(struct > virtchnl_proto_hdrs *proto_hdrs, >=20 > static uint64_t invalid_rss_comb[] =3D { > ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP, > + ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP, > ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP, > + ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP, > + ETH_RSS_GTPU | ETH_RSS_IPV4, > + ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP, > + ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP, > + ETH_RSS_GTPU | ETH_RSS_IPV6, > + ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP, > + ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP, > RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 | > RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 | > RTE_ETH_RSS_L3_PRE96 > -- > 2.17.1