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 78A67A0526; Wed, 8 Jul 2020 13:11:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54B871DA5A; Wed, 8 Jul 2020 13:11:03 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 22E711D6F7 for ; Wed, 8 Jul 2020 13:11:00 +0200 (CEST) IronPort-SDR: gnlLVeDwE94YxIjFrXs5ADuK9mJnX/nclnqwte97pVjlzdA669nzKC58XfjvN6eWVDmPYeCStG EuW5gepDn/Yg== X-IronPort-AV: E=McAfee;i="6000,8403,9675"; a="127855584" X-IronPort-AV: E=Sophos;i="5.75,327,1589266800"; d="scan'208";a="127855584" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 04:11:00 -0700 IronPort-SDR: BUqFHRwySuyF82+ycikksLpbCkzssbZbev4NuZZSZJvHpvMLvw+U6s2Ry8tbqCEFg4IGeGdkSV samRkIFUezxw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,327,1589266800"; d="scan'208";a="268446755" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga008.fm.intel.com with ESMTP; 08 Jul 2020 04:11:00 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 8 Jul 2020 04:11:00 -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; Wed, 8 Jul 2020 19:10:56 +0800 From: "Zhang, Qi Z" To: Thomas Monjalon , "Xing, Beilei" CC: "dev@dpdk.org" , "Guo, Jia" , "Guo, Junfeng" , "Su, Simei" , "Yigit, Ferruh" , "arybchenko@solarflare.com" , "viacheslavo@mellanox.com" , "jerinj@marvell.com" , "ajit.khaparde@broadcom.com" , "orika@mellanox.com" Thread-Topic: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 prefix Thread-Index: AQHWQ7a011zWOy0smEWiQz0KNMS5A6j7j+KAgAIBrwD//31JgIAAiJug Date: Wed, 8 Jul 2020 11:10:56 +0000 Message-ID: <039ED4275CED7440929022BC67E7061154858443@SHSMSX103.ccr.corp.intel.com> References: <20200612080711.39774-1-junfeng.guo@intel.com> <3862163.zQz20bWevW@thomas> <5a8a00e4-0e13-b60f-53e8-644f83ebf0de@intel.com> <2168344.3qRs3v1SFd@thomas> In-Reply-To: <2168344.3qRs3v1SFd@thomas> 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 v2 1/3] ethdev: add new RSS types for IPv6 prefix 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: Thomas Monjalon > Sent: Wednesday, July 8, 2020 5:58 PM > To: Ye, Xiaolong ; Xing, Beilei > ; Zhang, Qi Z > Cc: dev@dpdk.org; Guo, Jia ; Guo, Junfeng > ; Su, Simei ; Yigit, Ferruh > ; arybchenko@solarflare.com; > viacheslavo@mellanox.com; jerinj@marvell.com; > ajit.khaparde@broadcom.com; orika@mellanox.com > Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add new RSS types for IPv6 > prefix >=20 > 08/07/2020 11:45, Zhang, Qi Z: > > On 2020/7/7 19:06, Thomas Monjalon wrote: > > > 16/06/2020 10:16, Junfeng Guo: > > >> This patch defines new RSS offload types for IPv6 prefix with 32, > > >> 48, > > >> 64 bits of both SRC and DST IPv6 address. > > >> > > >> Signed-off-by: Junfeng Guo > > >> --- > > >> lib/librte_ethdev/rte_ethdev.h | 51 > ++++++++++++++++++++++++++++++++++ > > >> 1 file changed, 51 insertions(+) > > >> > > >> diff --git a/lib/librte_ethdev/rte_ethdev.h > > >> b/lib/librte_ethdev/rte_ethdev.h index 631b146bd..5a7ba36d8 100644 > > >> --- a/lib/librte_ethdev/rte_ethdev.h > > >> +++ b/lib/librte_ethdev/rte_ethdev.h > > >> @@ -538,6 +538,9 @@ struct rte_eth_rss_conf { > > >> #define ETH_RSS_L4_DST_ONLY (1ULL << 60) > > >> #define ETH_RSS_L2_SRC_ONLY (1ULL << 59) > > >> #define ETH_RSS_L2_DST_ONLY (1ULL << 58) > > >> +#define ETH_RSS_L3_PRE32 (1ULL << 57) > > >> +#define ETH_RSS_L3_PRE48 (1ULL << 56) > > >> +#define ETH_RSS_L3_PRE64 (1ULL << 55) > > > > > > PRE32, 48 and 64 are not obvious. > > > Why is it needed? > > > > there is typical usage for NAT64, which use 32 bit prefix for IPv6 > > addresses, in this case flows over IPv4 and IPv6 will result in the > > same hash value, as well as 48, 64, which also have some corresponding > > use cases, > > > At least, please add comments for the values of this API. > > > > sure, we will add more comments. > > > Do we want to continue with the RTE_ prefix missing? > > > Can't we add the prefix for the new values? >=20 > I think you misunderstood this question. I am asking to change the name > ETH_RSS_L3_PRE32 to RTE_ETH_RSS_L3_PRE32 OK, we are going change all the ETH_RSS_xxx to RTE_ETH_RSS_xxx, or just the= new values? the first option looks make sense to me. =20 >=20 > > 32, 48, 64 are typical usage, and consider suffix pair we may add > > later, it will cost 6 bits so far we still have 27 bit left, so it > > looks like will not be a problem in following couple releases. >=20 > Having some space left is not a reason to waste it :) If I understand wel= l, > there is no standard for this API. > You are assigning some bits to some usage. > I don't find it generic and flexible enough. Actually IPv6 address prefix is in spec, please check below RFC. https://tools.ietf.org/html/rfc6052#page-5 So probably we are not wasting bits here, since this is a typical usage tha= t DPDK can provide. Of cause more description is needed in the code here. > If you want to limit the size of the match, we should have a generic synt= ax to > choose how many bits of the IPv6 address are taken into account for RSS. = Or > maybe an IPv6 mask. Yes, I believe at some moment, a more generic solution is mandatory, And I think that will not work if we stick on the 64 bits, new API need to = be introduced and old one should be abandoned=20 >=20 > > but anyway use 64 bits to represent RSS inputset can't meet the coming > > complex RSS usage, we may need to figure out some new APIs and > abandon > > the old one. > > A stacked protocol layer with bit field selector in each layer is > > under consideration, hope we can contribute some RFC at some moment. > > also feel free let us know your thought. >=20 > My thought is to discuss how to fit this need in future and avoid adding = few > bits of temporary workaround. > API definition is serious and we must avoid temporary half solutions. >=20 >=20