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 696F7A0599; Sun, 19 Apr 2020 08:53:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0518F1D590; Sun, 19 Apr 2020 08:53:43 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10084.outbound.protection.outlook.com [40.107.1.84]) by dpdk.org (Postfix) with ESMTP id A66921D58D for ; Sun, 19 Apr 2020 08:53:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M1pVS2rHDYe5J/q9SWd76gagxdMj/b7iQ2TkjqeBNB2VyUATfuAOjvpu/1xfSOqOrPZEcd0BHx1HFtw4zb4je+Bvdc+cromTpmcq0hd51xL85f2N30ReXZvWmlJs6nKbWDfbiYoWvOy+L8Oh2EsVnIPBV+EqspHCHOBxAKYKA4KczEzYgwRYtQFoCQwL0QPtB3UXXog/zvI/QkfQtP3lpoyDLmED5BaACPO72GiDUR9nGWydQe9f4wGzH/S9IfD9eHaKrsI0RZ2mk9AnUWerGfk9oFYQgIkfUMzs1fvvuTlF5TzBwGsHluvCSKEzgmzVrWzi2GpQ1d9WvlMFjc9Cgw== 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=yUEhe8035MW5Gt1wBOz9ohLtjNrZizMIo9XGmNVn9RQ=; b=dzIipJdhBkkFb2CD7qRdH/lbpSWNxgqGGZKVJtAWj/IR8E9cMKNe4WB+09P2J/7EOiSEa69SWnJD7omxqDN4Nw8p9u0T+SNgvn5ZlxwTAnfQtqQATer0f4xZB/knONiGqqCqjnbL/R/NsR4o1gK9MQQsATKjifOBIwbSezI7tM/IcB57sifLblgGbGoSjq3T4OtsbPYILbEKIuP/ZhEH18VDIMLteUtaOFiU44VqZUtNowIWkwMQnS9TXvlayKl/i5q6WRMcg5YU4ml69EyRFyRJzmhrW4tpik0pu6PiuW4yedaob2lgEYuDvwnWarbvlu1UgltTDTW3kKXa4uGFHQ== 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=yUEhe8035MW5Gt1wBOz9ohLtjNrZizMIo9XGmNVn9RQ=; b=fVgehBVOIBo6MPPRxgFTOXn7eGvU/DNZYtflukIcL1MYEIZZIz21A5U8Z1OyzXwKvFyoPcwQWhSOKaI4Z1OrTap9Z9gVBXeifOrTx1c/vSqQvtFqiPbQ9cZFmm5lsaqtH3c81SDjfPPFIPiff1iKoH4k7PxzrYmzGvSyaP2FKHY= Received: from AM6PR05MB5176.eurprd05.prod.outlook.com (2603:10a6:20b:63::30) by AM6PR05MB4901.eurprd05.prod.outlook.com (2603:10a6:20b:c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.25; Sun, 19 Apr 2020 06:53:40 +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.030; Sun, 19 Apr 2020 06:53:40 +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 v7 3/3] app/testpmd: add new types to RSS hash commands Thread-Index: AQHWFIHoSWyriMNzOEa0PULhwkYIh6iABS2w Date: Sun, 19 Apr 2020 06:53:40 +0000 Message-ID: References: <20200318170401.7938-5-jia.guo@intel.com> <20200417183146.112672-1-jia.guo@intel.com> <20200417183146.112672-4-jia.guo@intel.com> In-Reply-To: <20200417183146.112672-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: a6f6f7d4-ade1-4d18-0033-08d7e42e64a2 x-ms-traffictypediagnostic: AM6PR05MB4901: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2276; x-forefront-prvs: 0378F1E47A 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)(366004)(396003)(39850400004)(376002)(186003)(76116006)(55016002)(9686003)(478600001)(7696005)(5660300002)(86362001)(33656002)(52536014)(54906003)(4326008)(2906002)(53546011)(6506007)(66946007)(64756008)(66556008)(71200400001)(66476007)(66446008)(81156014)(110136005)(26005)(316002)(8676002)(8936002); 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: sxdEaXRjvV7p+dCpU21bTJxApnIhSxerLfLhqyVneWRynw++KIKr4h9C4A0JllBjVWLtPlzkuCA3KpW7U+PL6mU/Cw9LT1uFEC2Zv9SPjwkJSv1eSLSi2bmVwpKM2FIY6yU0PARXujgifyQeWtcxm0gyYPiKD30OToMHWt8lcMoCfb8yUgGsxnLLoI4qo+pnmrxhfJNA7tkd9SHClGYQgFwmJX11O/w7DX9povB7wWPYBGfxp7sUCOda1K5uimR759YmWUZbJy5umMpop5tRh0ZfCIYBzga0PmtRkfD2mymjHPqfEHvAMJwdR9M2Ry5sJMqakLXdqiZXDOQYXbGGRfJBx6uVp3qG5wlnu7rHF/vnlOMPJGUWyeveR5BzNQG0hZxOEzSIQ5faVJdAZUbQI0mtuMDHdFDDdd+/1wO3WhqulvOI1bdNVyV6HrNNKr6C x-ms-exchange-antispam-messagedata: qxUchZ0HU7SLt2HiDaOmd9vConlc6E0M877jplsPD1Z70scnvI4YXb+XCAt42IGPdiHYNQLiyezpURYJuyGWHDMJKuSFdDrX/O10zB3XvYinbnqUM7AUYQmc8UI7SVh3duKn90CaT6IOcqXlJawo4g== 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: a6f6f7d4-ade1-4d18-0033-08d7e42e64a2 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2020 06:53:40.3431 (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: Z37bp2VbTsdpEqLyE8jYauI/z0o+y4AVqC51OtgcTRTnEwL2F0Wviz87tDZYuEvIlPSV6hCZRA9tZiziRm7xdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4901 Subject: Re: [dpdk-dev] [dpdk-dev v7 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" > -----Original Message----- > From: Jeff Guo > Sent: Friday, April 17, 2020 9:32 PM > To: bernard.iremonger@intel.com; Ori Kam ; > 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 v7 3/3] app/testpmd: add new types to RSS hash command= s >=20 > Add some new types, such as eth/l2-src-only/l2-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 > Example flow commands was: > testpmd>flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end \ > actions rss types l2tpv3 end key_len 0 queues end / end >=20 > port config commands was: > testpmd>port config all rss l2tpv3 >=20 > Signed-off-by: Jeff Guo > --- > v7->v6: > add missing type > add change in doc for port rss configure > --- Acked-by: Ori Kam Thanks, Ori > app/test-pmd/cmdline.c | 34 +++++++++++++++++---- > app/test-pmd/config.c | 14 +++++++-- > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- > 3 files changed, 40 insertions(+), 10 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 982322c35..97cf6ee35 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -2270,9 +2270,14 @@ cmd_config_rss_parsed(void *parsed_result, > int ret; >=20 > if (!strcmp(res->value, "all")) > - rss_conf.rss_hf =3D ETH_RSS_IP | ETH_RSS_TCP | > - ETH_RSS_UDP | ETH_RSS_SCTP | > - ETH_RSS_L2_PAYLOAD; > + rss_conf.rss_hf =3D ETH_RSS_ETH | ETH_RSS_VLAN | ETH_RSS_IP > | > + ETH_RSS_TCP | ETH_RSS_UDP | ETH_RSS_SCTP | > + ETH_RSS_L2_PAYLOAD | ETH_RSS_L2TPV3 | > ETH_RSS_ESP | > + ETH_RSS_AH | ETH_RSS_PFCP; > + else if (!strcmp(res->value, "eth")) > + rss_conf.rss_hf =3D ETH_RSS_ETH; > + else if (!strcmp(res->value, "vlan")) > + rss_conf.rss_hf =3D ETH_RSS_VLAN; > else if (!strcmp(res->value, "ip")) > rss_conf.rss_hf =3D ETH_RSS_IP; > else if (!strcmp(res->value, "udp")) > @@ -2299,6 +2304,18 @@ 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, "l2-src-only")) > + rss_conf.rss_hf =3D ETH_RSS_L2_SRC_ONLY; > + else if (!strcmp(res->value, "l2-dst-only")) > + rss_conf.rss_hf =3D ETH_RSS_L2_DST_ONLY; > + 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; > else if (!strcmp(res->value, "none")) > rss_conf.rss_hf =3D 0; > else if (!strcmp(res->value, "default")) > @@ -2359,7 +2376,8 @@ cmdline_parse_inst_t cmd_config_rss =3D { > .f =3D cmd_config_rss_parsed, > .data =3D NULL, > .help_str =3D "port config all rss " > - > "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan- > gpe|none|", > + > "all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|" > + "nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none|", > .tokens =3D { > (void *)&cmd_config_rss_port, > (void *)&cmd_config_rss_keyword, > @@ -2469,7 +2487,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#" > + "l2-src-only#l2-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 > @@ -2480,7 +2500,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|" > + "l2-src-only|l2-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 69c5633e8..72f25d152 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -75,10 +75,16 @@ static const struct { > }; >=20 > const struct rss_type_info rss_type_table[] =3D { > - { "all", ETH_RSS_IP | ETH_RSS_TCP | > - ETH_RSS_UDP | ETH_RSS_SCTP | > - ETH_RSS_L2_PAYLOAD }, > + { "all", ETH_RSS_ETH | ETH_RSS_VLAN | ETH_RSS_IP | ETH_RSS_TCP | > + ETH_RSS_UDP | ETH_RSS_SCTP | ETH_RSS_L2_PAYLOAD | > + ETH_RSS_L2TPV3 | ETH_RSS_ESP | ETH_RSS_AH | > ETH_RSS_PFCP}, > { "none", 0 }, > + { "eth", ETH_RSS_ETH }, > + { "l2-src-only", ETH_RSS_L2_SRC_ONLY }, > + { "l2-dst-only", ETH_RSS_L2_DST_ONLY }, > + { "vlan", ETH_RSS_VLAN }, > + { "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 }, > @@ -110,6 +116,8 @@ const struct rss_type_info rss_type_table[] =3D { > { "l4-dst-only", ETH_RSS_L4_DST_ONLY }, > { "esp", ETH_RSS_ESP }, > { "ah", ETH_RSS_AH }, > + { "l2tpv3", ETH_RSS_L2TPV3 }, > + { "pfcp", ETH_RSS_PFCP }, > { NULL, 0 }, > }; >=20 > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index dcee5de45..2928499b6 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -2199,7 +2199,7 @@ port config - RSS >=20 > Set the RSS (Receive Side Scaling) mode on or off:: >=20 > - testpmd> port config all rss > (all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|none= ) > + testpmd> port config all rss > (all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan= - > gpe|l2tpv3|esp|ah|pfcp|none) >=20 > RSS is on by default. >=20 > -- > 2.20.1