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 2E703A0577; Tue, 14 Apr 2020 11:48:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6582C1C221; Tue, 14 Apr 2020 11:48:33 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70077.outbound.protection.outlook.com [40.107.7.77]) by dpdk.org (Postfix) with ESMTP id CB2F41C20A for ; Tue, 14 Apr 2020 11:48:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L34ZoDCgPvzljJ9mYN2iSC0CImrcxmSHJie17Km7cpiuhU5eCjPbEAnJ3x1pEgp7zIJGvCbsFaF1Zp0MUs7NrxG7/Fn4uKmmsFdxxFvfOCjfk6AcEavecOS2mx+xOfnA+I8B/Hh8WQiPKkH4K4KJddG8WlYrrL4N5G7R44HYdHshleNw5HKAgie2ba/KUh9T/G/D67xYYTHu7xuHJN8/6f1HlSgylSD5jPlvWUQMwHbp+/xUDqvv0rFTHaAf0eeKU3YFCSsgJmNBdHSKTRTEkxlOe2hsbjXlHiT/tyEnnLrQUDTP8jAzC66s8XWDMcl/UH2Hk79z7tQok99ZG/G6Vw== 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-SenderADCheck; bh=PsXpOqAU3aulqZKdMrF+LlbdnH0MvWalxP/stA1JfXk=; b=I1/0DrqitQXK7TUVLOcUzOu/hBtzBXoGRc1sSAQDuKSUqnupLOnWxMoYp57DuU/Vz2PORiu5XKFKFj8c/dUUOQZ9szm0KtV5w2EFz0H07twqqQAiRiS9RVX2rMsTPcVxo7RY24uHBFOFe/5D+ByoUNTl40/L/esaMVg2nUnTrvPobnkjpNfCPEmKjfABv0dsqfeig1XeZWUwm4nyoSafIE9LKgPG/W0MeD5+EEYtyNNI9huqrjtsE6ETOdzt1h1F4WnW70ugZi+vuijLCh0Fo89mMhTmwUx3o7aZp9R4GPW8hluUGwnE52vVTydORH7Won9Ykop/9zrK2MtoOJHwdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PsXpOqAU3aulqZKdMrF+LlbdnH0MvWalxP/stA1JfXk=; b=IOH0EoDRDe4Aoe6YXqBHFgY0qfP5pNwJUD/Gl5f2kSmRK5CUOU1o/nGXtlFYwjbKeaBbKGgqfgL1xrAho7Wu4v1gKBOEPIQnybtc+vonW4ExFNYsBXL/CNvk2KcWjA05W504SRumIILwVH+5bfvZ25698/EcD6qEIgWVw6l+qiQ= Received: from AM6PR05MB5176.eurprd05.prod.outlook.com (2603:10a6:20b:63::30) by AM6PR05MB4360.eurprd05.prod.outlook.com (2603:10a6:209:4a::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Tue, 14 Apr 2020 09:48:31 +0000 Received: from AM6PR05MB5176.eurprd05.prod.outlook.com ([fe80::f5cd:b10f:5f1b:4b22]) by AM6PR05MB5176.eurprd05.prod.outlook.com ([fe80::f5cd:b10f:5f1b:4b22%7]) with mapi id 15.20.2900.028; Tue, 14 Apr 2020 09:48:31 +0000 From: Ori Kam To: Jeff Guo , "bernard.iremonger@intel.com" , "xiaolong.ye@intel.com" , "qi.z.zhang@intel.com" CC: "dev@dpdk.org" , "jingjing.wu@intel.com" , "yahui.cao@intel.com" , "simei.su@intel.com" Thread-Topic: [dpdk-dev v4 3/3] app/testpmd: add new types to RSS hash commands Thread-Index: AQHWEjkvC5PdZiP3KE2aZduEvp3wYah4Xnzg Date: Tue, 14 Apr 2020 09:48:31 +0000 Message-ID: References: <20200318170401.7938-5-jia.guo@intel.com> <20200414174225.64120-1-jia.guo@intel.com> <20200414174225.64120-4-jia.guo@intel.com> In-Reply-To: <20200414174225.64120-4-jia.guo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [185.149.253.12] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: ac226f80-1e32-4cd1-35f0-08d7e058fda6 x-ms-traffictypediagnostic: AM6PR05MB4360: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-forefront-prvs: 0373D94D15 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR05MB5176.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(136003)(346002)(396003)(376002)(39850400004)(366004)(66946007)(66476007)(66556008)(64756008)(66446008)(26005)(54906003)(316002)(7696005)(76116006)(2906002)(71200400001)(33656002)(86362001)(478600001)(6506007)(53546011)(55016002)(52536014)(8936002)(8676002)(110136005)(5660300002)(186003)(4326008)(81156014)(9686003); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EOpRybhA7vS7TCw9tIpTI4llZL9N3pETQGDpgh/hBRMGMw3N5nbWXqzn5tSuqsoJiVmE6NpIIKeXWK34TxDeyIv8y+j85GodUcZbv+mvNbDw8JBs1PXOsVQLH0XBXEuQ1MyVN653eP5YloS0qQbPGxJ0FtxdHTxdtq439VjLarhryzu4UzFt5uWM2ZTniCG/NIcNPEeQeC3Li/jn0QflauC1EZGH/bCHChiQ3rZgwLHMrYHH9Bd+30Pd8IE/dPgGfOA4+MWQHM4a9vd2KZ6iFkSL/m310q5vWS53rxy3Ld3sI+3zS4O5s2uC5iaA9znFWwmwd/WOWGWfJ63NRe4fXUhY5uSq0lfJ4mbwnaQ0q9fzNOtE1JldjoVsMPOnAKKiflePtBdRNoKZzwRyBJTQquT4Id6D+L2K5+sNfc7N9p8QYmY/uJU37a+PnLs25kLb x-ms-exchange-antispam-messagedata: spu3kF9ZmQNKcVqvMmqn12YB2cbsxBtJkYM2Bina9PNnHlJFBqNH6po6mCpuwX2vbOG6Ma4+MMBtpgjHPvWvZ1fdD/i/mVsZlZWnBgM2ZctfLkiho92Emek+7UiOWSCLlGyLRiawTV0qqIF2/oSZuw== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac226f80-1e32-4cd1-35f0-08d7e058fda6 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2020 09:48:31.2797 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: heyL7UoRli1g5nc5XnU/qx7jbm3ilo5wuEfzNyFEzuHGKddce2jZy95clQNeeBSKkNfGbL73FN9FM12JnU4RDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4360 Subject: Re: [dpdk-dev] [dpdk-dev v4 3/3] app/testpmd: add new types to RSS hash commands 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" Hi Jeff, PSB, Thanks, Ori > -----Original Message----- > From: Jeff Guo > Sent: Tuesday, April 14, 2020 8:42 PM > To: Ori Kam ; bernard.iremonger@intel.com; > xiaolong.ye@intel.com; qi.z.zhang@intel.com > Cc: dev@dpdk.org; jingjing.wu@intel.com; yahui.cao@intel.com; > simei.su@intel.com; jia.guo@intel.com > Subject: [dpdk-dev v4 3/3] app/testpmd: add new types to RSS hash command= s >=20 > Add some new types, such as eth-src-only/eth-dst-only/svlan/cvlan/ > l2tpv3/esp/ah/pfcp types into RSS hash commands, it could be used > to configure these rss input set by cmdline. >=20 > Signed-off-by: Jeff Guo > --- > v4->v3: > no change > --- > app/test-pmd/cmdline.c | 24 ++++++++++++++++++++++-- > app/test-pmd/config.c | 8 ++++++++ > 2 files changed, 30 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 863b567c1..df7309f61 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -2299,6 +2299,22 @@ cmd_config_rss_parsed(void *parsed_result, > rss_conf.rss_hf =3D ETH_RSS_L4_SRC_ONLY; > else if (!strcmp(res->value, "l4-dst-only")) > rss_conf.rss_hf =3D ETH_RSS_L4_DST_ONLY; > + else if (!strcmp(res->value, "eth-src-only")) > + rss_conf.rss_hf =3D ETH_RSS_ETH_SRC_ONLY; > + else if (!strcmp(res->value, "eth-dst-only")) > + rss_conf.rss_hf =3D ETH_RSS_ETH_DST_ONLY; > + else if (!strcmp(res->value, "s-vlan")) > + rss_conf.rss_hf =3D ETH_RSS_S_VLAN; > + else if (!strcmp(res->value, "c-vlan")) > + rss_conf.rss_hf =3D ETH_RSS_C_VLAN; > + else if (!strcmp(res->value, "l2tpv3")) > + rss_conf.rss_hf =3D ETH_RSS_L2TPV3; > + else if (!strcmp(res->value, "esp")) > + rss_conf.rss_hf =3D ETH_RSS_ESP; > + else if (!strcmp(res->value, "ah")) > + rss_conf.rss_hf =3D ETH_RSS_AH; > + else if (!strcmp(res->value, "pfcp")) > + rss_conf.rss_hf =3D ETH_RSS_PFCP; In patch ethdev: add new RSS offload types, you added a define for ETH_RSS_= ETH I don't see any usage for this enum in the code. Should it be added? Or removed from the first patch? > else if (!strcmp(res->value, "none")) > rss_conf.rss_hf =3D 0; > else if (!strcmp(res->value, "default")) > @@ -2467,7 +2483,9 @@ cmdline_parse_token_string_t > cmd_config_rss_hash_key_rss_type =3D > "ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6- > udp#" > "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#" > "ipv6-tcp-ex#ipv6-udp-ex#" > - "l3-src-only#l3-dst-only#l4-src-only#l4-dst- > only"); > + "l3-src-only#l3-dst-only#l4-src-only#l4-dst- > only#" > + "eth-src-only#eth-dst-only#s-vlan#c-vlan#" > + "l2tpv3#esp#ah#pfcp"); > cmdline_parse_token_string_t cmd_config_rss_hash_key_value =3D > TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, > NULL); >=20 > @@ -2478,7 +2496,9 @@ cmdline_parse_inst_t cmd_config_rss_hash_key =3D { > "ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" > "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" > "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|" > - "l3-src-only|l3-dst-only|l4-src-only|l4-dst-only " > + "l3-src-only|l3-dst-only|l4-src-only|l4-dst-only|" > + "eth-src-only|eth-dst-only|s-vlan|c-vlan|" > + "l2tpv3|esp|ah|pfcp " > "", > .tokens =3D { > (void *)&cmd_config_rss_hash_key_port, > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 71aeb5413..47256292b 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -79,6 +79,10 @@ const struct rss_type_info rss_type_table[] =3D { > ETH_RSS_UDP | ETH_RSS_SCTP | > ETH_RSS_L2_PAYLOAD }, > { "none", 0 }, > + { "eth-src-only", ETH_RSS_ETH_SRC_ONLY }, > + { "eth-dst-only", ETH_RSS_ETH_DST_ONLY }, > + { "s-vlan", ETH_RSS_S_VLAN }, > + { "c-vlan", ETH_RSS_C_VLAN }, > { "ipv4", ETH_RSS_IPV4 }, > { "ipv4-frag", ETH_RSS_FRAG_IPV4 }, > { "ipv4-tcp", ETH_RSS_NONFRAG_IPV4_TCP }, > @@ -108,6 +112,10 @@ const struct rss_type_info rss_type_table[] =3D { > { "l3-dst-only", ETH_RSS_L3_DST_ONLY }, > { "l4-src-only", ETH_RSS_L4_SRC_ONLY }, > { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, > + { "l2tpv3", ETH_RSS_L2TPV3 }, > + { "esp", ETH_RSS_ESP }, > + { "ah", ETH_RSS_AH }, > + { "pfcp", ETH_RSS_PFCP }, > { NULL, 0 }, > }; >=20 > -- > 2.20.1