From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4A996A04AB; Mon, 24 Jan 2022 17:35:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A15A141154; Mon, 24 Jan 2022 17:35:12 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2040.outbound.protection.outlook.com [40.107.94.40]) by mails.dpdk.org (Postfix) with ESMTP id 4A6B540040 for ; Mon, 24 Jan 2022 17:35:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZOXTlyeDB2KreZDo8Ge5IXHLBu5MoZCHy4w3Ub7R4BPMA1M0/eEoStbaz8twpZVr+MWT/FvjAb7hYtgKFjIdTCKou6t16reKDH8isxsS0z5+Hj9eNEvz3gQM6IimPqO5rXeEhVwaAK9Al+lp1sxubZBZ2gOyvc91SYmuPU0LzFNpwHqLru5C+L2xi8tEGcE1cyOhitITm7n4Hwx4M1tw8EUYB+klnuwgddbx3tQ75EzNetXdIq00sMLZXRbo3IZBV1uSyJy1xLd26BWqVkjkOTGIN3/FVy8BgA24xzoGiBq048rvQQ4UdanKfDszjl0nR9AeW4erLEf/IwXijxyplw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cU8rNkX8S0dLNMOPnXMDaxGevVnTJDE/hx/5kRjS81Q=; b=oEIWhBx8E7QZmDjsAMDb5ifcOLGzNBdorR/jVWjZ0q7yDJOGCn6pWHfa+tHoF3LvZn1ThQ9nVykAT7zJ9G4rao0d/D/DQQg5/NbhmOd5sgYiSdMgIWkmHk2dNw2MNxy6aFYV1/nFjZzn0s7lo8baooOPfVVNoD7yauls1UEIO6Z1oU+zCZKbbALRICx0dR3SuHnio5cVltffxPzmWx/oAlwkRW0qezGJNUudBua7LDrwckU9E7qNHNnMFPYzGAbgAZ7BdzFh222YMaKUuTo2Q/xMG67RIo2v/my/zhffhUVoPBq+qXeEWJrS6a3hqHTGz4St1CBTrNQwZdl2ptZRvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cU8rNkX8S0dLNMOPnXMDaxGevVnTJDE/hx/5kRjS81Q=; b=kHay3P4VWWYwicYZADVX+uDAjkPoV/UtgkoigIjf/naMreDJz8w5Iqqwxgp15Ntq57A5KIlztQZB0p01jwdvS2H7ihLS8Tx7j/LjEzA15BsCciETowjXmsbuf4XEzo2ScO/BGKCBeDdt71KZfZ95cOaETbobOOW+ebY7ZP3xjsFaj/Gx2qTSJW3Ms9nJP4QzdZAqMIO7tFCq1N1W4T1lh8Ew+/o9Dsbjrmv4imJbxELh/eRmnpkNAh55Y5WLv1nF44lUUkqQuNLlbVRwDPNaW4tj4qTCBWeW14IwWSmvq3J2WuaB+xQisCcgM1YXYJWpYge74kuhrMufKpjiV9WD6g== Received: from MW2PR12MB4666.namprd12.prod.outlook.com (2603:10b6:302:13::22) by SN1PR12MB2399.namprd12.prod.outlook.com (2603:10b6:802:2b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.10; Mon, 24 Jan 2022 16:35:09 +0000 Received: from MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::78:438a:c6b7:1cc1]) by MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::78:438a:c6b7:1cc1%3]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 16:35:09 +0000 From: Ori Kam To: Jie Wang , "dev@dpdk.org" CC: "stevex.yang@intel.com" , "aman.deep.singh@intel.com" , "ferruh.yigit@intel.com" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , "andrew.rybchenko@oktetlabs.ru" , "jingjing.wu@intel.com" , "beilei.xing@intel.com" , "qi.z.zhang@intel.com" Subject: RE: [PATCH 1/6] ethdev: add L2TPv2 RSS offload type Thread-Topic: [PATCH 1/6] ethdev: add L2TPv2 RSS offload type Thread-Index: AQHYEO+V7ayZ+wh6gUCM83Xy9tqEbKxyXdpg Date: Mon, 24 Jan 2022 16:35:09 +0000 Message-ID: References: <20220124065613.2197436-1-jie1x.wang@intel.com> <20220124065613.2197436-2-jie1x.wang@intel.com> In-Reply-To: <20220124065613.2197436-2-jie1x.wang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b29839bf-4ace-4524-1ecc-08d9df577c83 x-ms-traffictypediagnostic: SN1PR12MB2399:EE_ x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2201; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RnRnlQH5U1ThKXER6W6QRBqUUylvDFUPdrtruyIDwd/s+1BlXspI2NWcNfzxPOicfblj614k7tsU0+nc97M7lP0KJgE/xTwv2Z41Pn8fZjpA8bEPCJvODvx4/Ku9JWBhBQMM9mtE9rBp6rHgi2lk7+kSjcQLdiRtuxtDuGqC5PslTdnrdfQ7wirfEiE4L95feDloLjl45MEHwKOr4orZ8p1JfRf+6WHM+ZzcpnkU25hVb1Dc0C2xCrfL5JZEwgBQfgpxnNXAx9RPxq3icZSv47SrH7VSxzoVsFieUVvYZYQWCRXYyjF1g4fpospzerAZvjp0a1zW3dxY/Y0+R41QEzA6O3bA7zSjlOpJ5ysFluoVBj8KxSzlPXilz05/ab2KuaIHunuHm3Io28hC/sWPFnLS9QecAF2glOVuR1HJLEHpNwD8QjYYRhrrBzy4RMFgWts960GTWrXVxzpgZxJ78UsEpIfFwiiobh3S2B7pKBa2bMLp8sPhSwzByaA9nK9X6zMZHYO1PwrRsC/Hm65AMDuKBryNSU68stgBLrfOv0OBCGltCT7GA+41GODLCkpEkefs0r4hRiAVK6BKwh+Vbq960976mPuXUvnHr2bF44q6IsiBpoLclFcQOCVfJYjI4wajc/hdmoE9NJdRXV8hqRX9Jdr9jjk+5jHZLIHUbKCPt3h+6ca+jFLcogqArRYCFxNNOFUeHCe/hV7k1/yZrA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB4666.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(55016003)(38070700005)(7416002)(2906002)(316002)(508600001)(7696005)(86362001)(8936002)(71200400001)(8676002)(53546011)(110136005)(54906003)(83380400001)(52536014)(76116006)(5660300002)(186003)(4326008)(66946007)(66446008)(64756008)(9686003)(38100700002)(66476007)(33656002)(66556008)(26005)(122000001)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?YcFTRldAdSuAAac+yeJazomy6augp8F+nkXphWIcC9I2E4vF9Q7UsBeQ9y4C?= =?us-ascii?Q?HF9s+Po+Nqy+oOWPIsYkApIQtY9vrDCh5WWJgLAavPdOx0zUoJgnUU/Itutu?= =?us-ascii?Q?QNky9LSi1EmCegCflK7bMWCRGck86XX7pn6gtKWEOWpvtHWypSnKA7eD5d2y?= =?us-ascii?Q?6JnYWFD37K2WJJ+kJM4wt5DbrhvNKgECBcchBQO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+BlmKIGnOlmcRil9GnmoJ2UYyENaIxrLv3cqr37vycNlm?= =?us-ascii?Q?Q7by/L6GpHtypcT12skvpAfd5OnuouUl5tKl6QIjF1VILSBHSCyUl1otR+ZV?= =?us-ascii?Q?YIjsmLCyIQs9M5Ik0BipkUPyvAH4zJMOOD29y9vI5RsYtFOBV1P0oYxu7xbo?= =?us-ascii?Q?GT7UBLXgTOWvfN94q3Mk8SHhqX9crc69tKDo8Pdv8fsaCZfEVQuWlNvTku4y?= =?us-ascii?Q?c3pOv9nQE49x54fU2IvKzGJKG26+fpHZhdkNVcQom6s2gx7V6YbWLfrruaXw?= =?us-ascii?Q?zqH+oCwQLjtyjNfEIlLE8z9CooCp40Rwx1OLPgxjSi/S5eoJF3MaDpA+h6ER?= =?us-ascii?Q?RS/D6kH/7cEo0jo01tSc6NEE/5fMfemANzy3s3KEWu9mObWbmLSQPryy7y9Z?= =?us-ascii?Q?e+C0HQU1iR2hNL5lzDZwM/9E8kMRM2FCL3zC3i9bFomBGCzF1PzZU+GTfB8C?= =?us-ascii?Q?LeXu2miZA3C/ILnaeCygpdE99Nhcfquc4/7kSlFFGFUR3m/JR67HQBL0CIUO?= =?us-ascii?Q?J4MDlMZoAfYfGNSXg9ft2zM=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR12MB4666.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b29839bf-4ace-4524-1ecc-08d9df577c83 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2022 16:35:09.2346 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9giZi5umhnkaGHvjhaOWF9A1zqJrnMsOKB4dMYxKwbz16CREPjXvUv0KD83kVqqtsWeOszIcjg9BGAUPHuuY2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2399 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Jie > -----Original Message----- > From: Jie Wang > Sent: Monday, January 24, 2022 8:56 AM > Subject: [PATCH 1/6] ethdev: add L2TPv2 RSS offload type >=20 > This patch defines new RSS offload type for L2TPv2, which > are required when users want to distribute packets based on > the L2TPv2 field. >=20 > Signed-off-by: Jie Wang > --- > app/test-pmd/cmdline.c | 10 ++++++---- > app/test-pmd/config.c | 3 ++- > doc/guides/rel_notes/release_22_03.rst | 5 +++++ > lib/ethdev/rte_ethdev.h | 3 +++ > 4 files changed, 16 insertions(+), 5 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 6e10afeedd..3914fb9a75 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -2178,7 +2178,7 @@ cmd_config_rss_parsed(void *parsed_result, > RTE_ETH_RSS_TCP | RTE_ETH_RSS_UDP | RTE_ETH_RSS_SCTP | > RTE_ETH_RSS_L2_PAYLOAD | RTE_ETH_RSS_L2TPV3 | RTE_ETH_RSS_ESP | > RTE_ETH_RSS_AH | RTE_ETH_RSS_PFCP | RTE_ETH_RSS_GTPU | > - RTE_ETH_RSS_ECPRI; > + RTE_ETH_RSS_ECPRI | RTE_ETH_RSS_L2TPV2; > else if (!strcmp(res->value, "eth")) > rss_conf.rss_hf =3D RTE_ETH_RSS_ETH; > else if (!strcmp(res->value, "vlan")) > @@ -2256,6 +2256,8 @@ cmd_config_rss_parsed(void *parsed_result, > rss_conf.rss_hf =3D (rss_hf | RTE_ETH_RSS_LEVEL_INNERMOST); > } else if (!strcmp(res->value, "default")) > use_default =3D 1; > + else if (!strcmp(res->value, "l2tpv2")) > + rss_conf.rss_hf =3D RTE_ETH_RSS_L2TPV2; > else if (isdigit(res->value[0]) && atoi(res->value) > 0 && > atoi(res->value) < 64) > rss_conf.rss_hf =3D 1ULL << atoi(res->value); > @@ -2314,7 +2316,7 @@ cmdline_parse_inst_t cmd_config_rss =3D { > .help_str =3D "port config all rss " > "all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|" > "nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|ecpri|mpls|none|level-default|" > - "level-outer|level-inner|ipv4-chksum|", > + "level-outer|level-inner|ipv4-chksum|l2tpv2|", > .tokens =3D { > (void *)&cmd_config_rss_port, > (void *)&cmd_config_rss_keyword, > @@ -2429,7 +2431,7 @@ cmdline_parse_token_string_t cmd_config_rss_hash_ke= y_rss_type =3D > "ipv6-tcp-ex#ipv6-udp-ex#" > "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only#" > "l2-src-only#l2-dst-only#s-vlan#c-vlan#" > - "l2tpv3#esp#ah#pfcp#pppoe#gtpu#ecpri#mpls"); > + "l2tpv3#esp#ah#pfcp#pppoe#gtpu#ecpri#mpls#l2tpv2"); > cmdline_parse_token_string_t cmd_config_rss_hash_key_value =3D > TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL); >=20 > @@ -2442,7 +2444,7 @@ cmdline_parse_inst_t cmd_config_rss_hash_key =3D { > "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" > "l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|" > "l2-src-only|l2-dst-only|s-vlan|c-vlan|" > - "l2tpv3|esp|ah|pfcp|pppoe|gtpu|ecpri|mpls " > + "l2tpv3|esp|ah|pfcp|pppoe|gtpu|ecpri|mpls|l2tpv2 " > "", > .tokens =3D { > (void *)&cmd_config_rss_hash_key_port, > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 1722d6c8f8..ec922bd304 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -90,7 +90,7 @@ const struct rss_type_info rss_type_table[] =3D { > { "all", RTE_ETH_RSS_ETH | RTE_ETH_RSS_VLAN | RTE_ETH_RSS_IP | RTE_ETH_= RSS_TCP | > RTE_ETH_RSS_UDP | RTE_ETH_RSS_SCTP | RTE_ETH_RSS_L2_PAYLOAD | > RTE_ETH_RSS_L2TPV3 | RTE_ETH_RSS_ESP | RTE_ETH_RSS_AH | RTE_ETH_RSS_PF= CP > | > - RTE_ETH_RSS_GTPU | RTE_ETH_RSS_ECPRI | RTE_ETH_RSS_MPLS}, > + RTE_ETH_RSS_GTPU | RTE_ETH_RSS_ECPRI | RTE_ETH_RSS_MPLS | > RTE_ETH_RSS_L2TPV2}, > { "none", 0 }, > { "eth", RTE_ETH_RSS_ETH }, > { "l2-src-only", RTE_ETH_RSS_L2_SRC_ONLY }, > @@ -143,6 +143,7 @@ const struct rss_type_info rss_type_table[] =3D { > { "mpls", RTE_ETH_RSS_MPLS }, > { "ipv4-chksum", RTE_ETH_RSS_IPV4_CHKSUM }, > { "l4-chksum", RTE_ETH_RSS_L4_CHKSUM }, > + { "l2tpv2", RTE_ETH_RSS_L2TPV2 }, > { NULL, 0 }, > }; >=20 > diff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_note= s/release_22_03.rst > index 6d99d1eaa9..30695f11b7 100644 > --- a/doc/guides/rel_notes/release_22_03.rst > +++ b/doc/guides/rel_notes/release_22_03.rst > @@ -55,6 +55,11 @@ New Features > Also, make sure to start the actual text at the margin. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D >=20 > +* **Added new RSS offload types for L2TPv2 in RSS flow.** > + > + Added macros RTE_ETH_RSS_L2TPV2, now L2TPv2 field can be used as > + input set for RSS. > + Which fields exactly? I assume it is tunnel id but can it be something else= ? >=20 > Removed Items > ------------- > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index fa299c8ad7..43f582c90c 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -645,6 +645,9 @@ struct rte_eth_rss_conf { > #define RTE_ETH_RSS_L4_CHKSUM RTE_BIT64(35) > #define ETH_RSS_L4_CHKSUM RTE_ETH_RSS_L4_CHKSUM >=20 > +#define RTE_ETH_RSS_L2TPV2 RTE_BIT64(36) > +#define ETH_RSS_L2TPV2 RTE_ETH_RSS_L2TPV2 > + I know it was not done until now, but I think it is important to explain ex= actly on what fields this hash is being done. > /* > * We use the following macros to combine with above RTE_ETH_RSS_* for > * more specific input set selection. These bits are defined starting > -- > 2.25.1 Best, Ori