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 1759FA00C5; Sun, 30 Jan 2022 10:15:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E48240E09; Sun, 30 Jan 2022 10:15:57 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2060.outbound.protection.outlook.com [40.107.220.60]) by mails.dpdk.org (Postfix) with ESMTP id 0FC3540041 for ; Sun, 30 Jan 2022 10:15:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lkCegWYZUAS7M+cbzjP67XIiQNfqLmfkVsjoyRxVoWh+49RYcTdtsXfb9S5fygHggPD2gRgJqnDyprtU6ICF0T4hc8ZXHDbVLTNQhDDqJMaZVjPwgZ4fnqO73cA9MttWlS/A5tXm/QhwVIJg1pIS4q0Foify20uW5TvF4qydiERlq1v8BizWyEUd+6j1hV1QNdMtkNi9ERHewJtCcXF0Hj+NXryY4osaAv8x5nO4L7Ep+HpfKzueGVMHFHdQ3wzK2kBOqx9r4+LdIA/C3aR6ttfT8fPFRfsogL2S+o3Zg/LL0dIKGwB9Kb24zBgS2w6CsCcNOR4H69hFCrXIMM/jQg== 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=+b1pSUSmh0sIh7bou1+3rPlMYp7hUYaKS8fP9h8wb9c=; b=LPe0hf4moe+un2sqGBfiE/B1DaIFKvWjrxKz8CNimfFDs1ubLZssab9oQuZWpht9baQEiA2hc+kz2+8o4hlBPJzhfehUneH3DE3aLP5PTKPLUOACUfDlJJyeSlpqFu9vP47j236pRpMkRcxYVN4brcjQlPyXsLWI4Y9fm4vZUe4MEKmlwxf10T9skSInZ7dlQnIPzfgGujUubFFXY5Xn04X9ge1tb+/bDlDeYt/CKpYy/W58gbt1t1HjJMObj+cIA9oARlOPv1SFtw9ULW1i1X1gGgi/bxak2NnCXKDCT3r8+bruDjp8qgssjyVwY3JfHswLqHRc8p6Gbpl+pYjrwg== 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=+b1pSUSmh0sIh7bou1+3rPlMYp7hUYaKS8fP9h8wb9c=; b=qs+d3fnR5rgVAFDykuWTOPX2CPdQSCirkSVhaIIFmzpYiZujt82cMkoNWeTs+W2Y4Q32DDSFaI89BLfcoSeUejSsTsG+DupfWxiHPhJl/UBnp+a28UbODTFPcvzfvuM23FhlEIpFaMq6fhoXWl8tkO9JpTM87ocvIul7a3mmhdCa7wdJWMh2jc+DLWviEM2v0I87fHHtyJz3Yb9W9LmIjAT27iy41Pbzgmtlw3PTh2Z8NV7ayACAAnw4sH7YX3FlT0VSyHQwtsDO4jYjiQBQjkaMv46e+Sc/cixAAlOMepA0qd773Smhzbxf2JGZIt/hkh0BzzpkApszax2GMA0LXw== Received: from MW2PR12MB4666.namprd12.prod.outlook.com (2603:10b6:302:13::22) by MN2PR12MB4389.namprd12.prod.outlook.com (2603:10b6:208:262::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15; Sun, 30 Jan 2022 09:15:49 +0000 Received: from MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::1869:1984:7899:8cbb]) by MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::1869:1984:7899:8cbb%4]) with mapi id 15.20.4930.018; Sun, 30 Jan 2022 09:15:49 +0000 From: Ori Kam To: "20220126063016.2384393-1-jie1x.wang@intel.com" <20220126063016.2384393-1-jie1x.wang@intel.com>, "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" , "olivier.matz@6wind.com" Subject: RE: [PATCH v3 1/6] ethdev: add L2TPv2 RSS offload type Thread-Topic: [PATCH v3 1/6] ethdev: add L2TPv2 RSS offload type Thread-Index: AQHYFNkGOzXihGjPME2EHEfotYw2sKx7Sdbw Date: Sun, 30 Jan 2022 09:15:48 +0000 Message-ID: References: <20220129062434.2455711-1-jie1x.wang@intel.com> <20220129062434.2455711-2-jie1x.wang@intel.com> In-Reply-To: <20220129062434.2455711-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: 468bc8ed-b022-41ae-57c4-08d9e3d11b05 x-ms-traffictypediagnostic: MN2PR12MB4389:EE_ x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:644; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6juddCkMOIPxJWBNcxil8B4Ng6fhLhxclF5Rlo9ZCPxTyjz2BWODWcwGe2KRm7hJvT466xdqcdu1PbYVx+7bJzY3grolTUo8l+lSJBcdHnuL95Q9OFLldhlDFjag9ah0E8vh8zG2KLduyHc2Rwdztm2iQZRogSEjgQVtYncZ1Z48XQaeUIAq/WZ+TPEsL0GnRABTMh7aXbDmX+Q8As+RiU9jVjeSGe5p3PF+n1crqLLvH990xGpQnfMnsLIbIGQLjP4Lfv5sRhp6+O69qMzJDwB597t0SvcjeUFO0O4Gk0Bp0T6ZtKdLzBYDzvjYYfSXrVZjhNeyry6sjOGT70GjHg0311OTcxG3p5aLH7pjXKGyCCFz61tQhK7IKbaQ2z/ACz/tgJoRbgtpCJTDDZ5ANxpNm80PsNvMIGIC+zYx/O5g62H5vPgmyKDsXNAtjOuaAzZyYkMb3L35Ap1/ymTlCHwVpTXqp40eHBKXgRcb5eFGjtJWE29wEl3kR0sv3TdObCYLpV0kiQ3fr63ri5IX8Rh4QggQtkkxtMGn/Xbj2D2LsWgdX2gOlQDG3Gni6HqC09DqWq3LtPv/2w45LSForkugiIKVJ543BdRIDXxjFgwlrR2YrN8E/vLvov1+kg7SjkQMuGsrbLwbdeXrFqnFvcG0s+GzOn2B9e6B8PtBn82m4wWnM1rV3rUncvRjHjn9ipx7SedpIV93L3lh1VTb2A== 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:(13230001)(4636009)(366004)(71200400001)(38070700005)(508600001)(38100700002)(122000001)(26005)(186003)(33656002)(86362001)(4326008)(64756008)(66446008)(66476007)(8676002)(76116006)(52536014)(66946007)(5660300002)(7416002)(83380400001)(55016003)(8936002)(53546011)(7696005)(6506007)(316002)(110136005)(2906002)(66556008)(54906003)(9686003)(20210929001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7Q2t1JFPAi0pMyhsM3OJd1B3gb5c8kZ8HRI3s2am6IYf2rFIVTgCXRZzPiFf?= =?us-ascii?Q?aGczG8NR/5ydhwPy1zi01PGW5N9cYX77KBW1Z3FAAHtjqd+Ni8EcoQ8O3tJs?= =?us-ascii?Q?6xhdZPoXGsNsDa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N?= =?us-ascii?Q?+hJ1SNkdK9+ZsuOLcTj9TVyTKee9hd6TbJ2V5zQlBWbeOjxMWYK5FJO+JvOt?= =?us-ascii?Q?xCtK6gIqEieRNHd8hAYD/rAiNJlnMJVgNjL6saIDUgwPW3d99mWx7Pc+r4s6?= =?us-ascii?Q?j5GK/UdIOVQzG0qT3eGIHcVcdEwE2Jzk33jiUeTUO1XQqjcvCFg99zzAk/ip?= =?us-ascii?Q?ZL9XEknxaXRV4I3e85ZOtxdgw+tatqfsHbbzt6t+ezbxyIGh4lmWrQwsm3qZ?= =?us-ascii?Q?8/RYPn5Ty5jeD1huRI2wIosP1/AI7PrVlNC9uSEZsSyNq3NgUXBm7oWafZjE?= =?us-ascii?Q?6Y9xM8mCXBydLnWjd7MYTiCsFTkaBMJ0Sk1/+AykphierHjxvAT+RyFuv2Ox?= =?us-ascii?Q?7UKkCgrT5cmTRG3LLfHQa8LdgQ22IZ8oh4hkYT/hu+co6zgOdzjzFGi4y27P?= =?us-ascii?Q?oivVSWtPrMXMplKVElr6tTQwvrl/6LGOcMoBrf9rX7ZlmTnIsyJBzTJ2RXBc?= =?us-ascii?Q?bR+a2DU1MJqeUWzfU9XYv0BItZwb9iMblZFCuAmEXW0EO1FKObLSflkH673S?= =?us-ascii?Q?ehoO2l19gi4Kf+oQpKEt7pQHvjpl7LimsjeFuC3q4PBxzGKUOQh6oaeFmOog?= =?us-ascii?Q?dA=3D=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: 468bc8ed-b022-41ae-57c4-08d9e3d11b05 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jan 2022 09:15:48.9859 (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: a/Dat63RqgJbmSqHW+7f993Z3aFT+V5LSOPQDzKiE07fTDxrTkJeGc/IxSzOnhe1LwnoGWleJ7SkaleWgBHIyw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4389 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: Saturday, January 29, 2022 8:24 AM > Subject: [PATCH v3 1/6] ethdev: add L2TPv2 RSS offload type >=20 > This patch defines new RSS offload type for L2TPv2, which > is required when users want to distribute packets based on > the L2TPv2 session ID 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 | 7 +++++++ > 4 files changed, 20 insertions(+), 5 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index e626b1c7d9..d535311f21 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 33be3241b9..9a507ab9ea 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 macro RTE_ETH_RSS_L2TPV2, now L2TPv2 session ID field can be use= d as > + input set for RSS. > + > * **Updated Cisco enic driver.** >=20 > * Added rte_flow support for matching GENEVE packets. > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index 147cc1ced3..29e6091bc8 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -651,6 +651,13 @@ struct rte_eth_rss_conf { > #define RTE_ETH_RSS_L4_CHKSUM RTE_BIT64(35) > #define ETH_RSS_L4_CHKSUM RTE_DEPRECATED(ETH_RSS_L4_CHKSUM) RTE_ETH_RSS_= L4_CHKSUM >=20 > +/* > + * Below macro is defined for RSS offload type, it can be used to > + * fill rte_eth_rss_conf.rss_hf or rte_flow_action_rss.types. > + */ > +#define RTE_ETH_RSS_L2TPV2 RTE_BIT64(36) > +#define ETH_RSS_L2TPV2 RTE_ETH_RSS_L2TPV2 > + > /* > * 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 Acked-by: Ori Kam Best, Ori