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 D624CA0613 for ; Sat, 28 Sep 2019 20:40:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1E3801DB9; Sat, 28 Sep 2019 20:40:01 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40045.outbound.protection.outlook.com [40.107.4.45]) by dpdk.org (Postfix) with ESMTP id 34FBE11A2 for ; Sat, 28 Sep 2019 20:39:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XoHWIvii1nLijkCE13bxUIZvc2/AdDHoOZ+uSHa5AtJ2dBZ5ISnmL0EhZa+pjQ7kUg/ulkY11kXdjF5ZuHDiPysHecjJbAuMze1jBVUXF79jNssfxNF0D23JIZIf9AjgACYL5S/FcmNHCzJlcvS+EW6FwteU59bsQ/puZ1w4dz5Q6q5e8Nkr6+/nQpREj9ko1Kv+vj73gffEZoVIv8Cal3hwuECvZn8aajmtlX/DaKZjBYff8JiTG8KckQYskscy4fdITVNwP5ILkct6fL2qBN8TW2ndQTZIyXHHkiQ8N5KiN/0Wxc8Fn/GyLZ7eYu0knr/8iPe8eDF1tPhoz3UqYQ== 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=3YiYFAj5YdtV04N5GZnWBDFqIN0M/qTqWrTt+51aTts=; b=E+0qNKpYyl+rNaeS+0G/O3gtReC5sesDrUk40wvh7bIt7ByVl8dIzbbJuzx3vu18x2y4U9Hh9T7u1+g/qKY7XOj22u2z95g5bTchd1SoGFr3K1Q3DUrWX/rxTtxWwgIOYTIm0yktb7bhiP3KQTUEeg85K+gaAmx6AwSl9qGloXsx/tsiE5WpErVozQ8T0jjQ/9XM64AD/9KwSfUehuEIbXeUKIxIu24pC2Pv9IdLT2Qnw8t4reAxdoZY0GvHvJaDmik4zy7hA2QMju8+K6Zb/fOV5zlk3uKe5me+pokOxvy9D2i/ugmTs0WcgZSe6wVb3AAqOimMelGGJhP0/x1x/w== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3YiYFAj5YdtV04N5GZnWBDFqIN0M/qTqWrTt+51aTts=; b=C8FUA9eChgPqAZlvDbVfBXxwxeFhv3cej4wj3IMvDrmpbsDcdN0Tn1N7zL+yKqwHbzIHKcl5dUp8Gwp5PZ85jlz7FF0HTJrcNXJ8/eoharqu8SpwIEHdBdY0JzBHZptr2d+fBqvb23kV7VcY2wisEMxjMR9Ahmqr5yipxg86G7A= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3204.eurprd05.prod.outlook.com (10.171.186.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.25; Sat, 28 Sep 2019 18:39:57 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::7964:7996:4c67:ade0]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::7964:7996:4c67:ade0%3]) with mapi id 15.20.2305.017; Sat, 28 Sep 2019 18:39:57 +0000 From: Ori Kam To: simei , "qi.z.zhang@intel.com" , "jingjing.wu@intel.com" , Adrien Mazarguil CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 2/2] app/testpmd: add symmetric toeplitz hash support Thread-Index: AQHVQ1LRhn7EtlLEZU2Ui3wPOAtCyqdB0XxQ Date: Sat, 28 Sep 2019 18:39:57 +0000 Message-ID: References: <1564030646-73951-1-git-send-email-simei.su@intel.com> <1564102511-99609-1-git-send-email-simei.su@intel.com> <1564102511-99609-3-git-send-email-simei.su@intel.com> In-Reply-To: <1564102511-99609-3-git-send-email-simei.su@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.175.35.255] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2e72501b-b53c-45ff-612d-08d7444342f1 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:AM4PR05MB3204; x-ms-traffictypediagnostic: AM4PR05MB3204: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:393; x-forefront-prvs: 0174BD4BDA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(376002)(346002)(39850400004)(136003)(13464003)(189003)(199004)(52536014)(2201001)(86362001)(71190400001)(71200400001)(25786009)(33656002)(55016002)(7736002)(305945005)(74316002)(256004)(229853002)(2906002)(5660300002)(9686003)(478600001)(6436002)(6246003)(486006)(8936002)(446003)(76176011)(11346002)(4326008)(81166006)(2501003)(14454004)(81156014)(99286004)(316002)(53546011)(66066001)(6506007)(64756008)(102836004)(66446008)(186003)(6116002)(110136005)(3846002)(26005)(66556008)(66476007)(7696005)(76116006)(476003)(66946007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3204; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 6QS9PE3DzqUy2/0224fBvGga8IZSGvFLziKQ+KouqVa83rVIfRF0AYIRNMZQ14iw2MDv6GhvB2p97gNAPJMIrqYNyDMlgKxRyMaMk/IW4Y3xH0JnS20XaNkJONAeLD5pZz8IKKu5U5DSiQIZAuqv+/2ctWmNHFGbNWj1XhrMH/rQfK4Ftz7S/lcWtLz0gaxGa1EgRT1IFsBva2vcmttaFtduzxLj0xKSyyh+qCWTuuSFngQkPA2N8ZJZVGk2gj44HxEF6xmlTexAfqGKBmelDJpIvGb2QN/oPNAoJ2yScPfCIYIE9OZFN4Nnc2vnSCF+/Ok6lgg5V8RqZV4gLiE7f76FqpOHWspn3dsz/wyvl09kmdDSXWZs+59s/oBd8Co4QTVUoYFNRsupCeFTdkYRHVrnzL+YbFDE6o6xwn6lJn4= 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: 2e72501b-b53c-45ff-612d-08d7444342f1 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2019 18:39:57.1708 (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: blW5KstSdJxzWznU2h85e6lkBh7+e+ivHnEjxIapIzfF1Xi86gGxWXNakFTYtPsqHZourso0VwLkFcyB8JL/Dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3204 Subject: Re: [dpdk-dev] [PATCH v2 2/2] app/testpmd: add symmetric toeplitz hash support 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: dev On Behalf Of simei > Sent: Friday, July 26, 2019 3:55 AM > To: qi.z.zhang@intel.com; jingjing.wu@intel.com; Adrien Mazarguil > > Cc: dev@dpdk.org; simei.su@intel.com > Subject: [dpdk-dev] [PATCH v2 2/2] app/testpmd: add symmetric toeplitz ha= sh > support >=20 > From: Simei Su >=20 > This patch adds command line support for Symmetric Toeplitz > hash configuration. >=20 > Signed-off-by: Simei Su > --- Acked-by: Ori Kam Thanks, Ori Kam > app/test-pmd/cmdline.c | 12 +++++++++--- > app/test-pmd/cmdline_flow.c | 12 +++++++++++- > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- > 3 files changed, 21 insertions(+), 5 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index a28362d..60c159f 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -1055,7 +1055,7 @@ static void cmd_help_long_parsed(void > *parsed_result, > "get_hash_global_config (port_id)\n" > " Get the global configurations of hash filters.\n\n" >=20 > - "set_hash_global_config (port_id) > (toeplitz|simple_xor|default)" > + "set_hash_global_config (port_id) > (toeplitz|simple_xor|symmetric_toeplitz|default)" > " (ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4- > other|ipv6|" > "ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6- > other|l2_payload)" > " (enable|disable)\n" > @@ -12258,6 +12258,9 @@ struct cmd_get_hash_global_config_result { > case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR: > printf("Hash function is Simple XOR\n"); > break; > + case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ: > + printf("Hash function is Symmetric Toeplitz\n"); > + break; > default: > printf("Unknown hash function\n"); > break; > @@ -12331,6 +12334,9 @@ struct cmd_set_hash_global_config_result { > else if (!strcmp(res->hash_func, "simple_xor")) > info.info.global_conf.hash_func =3D > RTE_ETH_HASH_FUNCTION_SIMPLE_XOR; > + else if (!strcmp(res->hash_func, "symmetric_toeplitz")) > + info.info.global_conf.hash_func =3D > + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ; > else if (!strcmp(res->hash_func, "default")) > info.info.global_conf.hash_func =3D > RTE_ETH_HASH_FUNCTION_DEFAULT; > @@ -12360,7 +12366,7 @@ struct cmd_set_hash_global_config_result { > port_id, UINT16); > cmdline_parse_token_string_t cmd_set_hash_global_config_hash_func =3D > TOKEN_STRING_INITIALIZER(struct > cmd_set_hash_global_config_result, > - hash_func, "toeplitz#simple_xor#default"); > + hash_func, "toeplitz#simple_xor#symmetric_toeplitz#default"); > cmdline_parse_token_string_t cmd_set_hash_global_config_flow_type =3D > TOKEN_STRING_INITIALIZER(struct > cmd_set_hash_global_config_result, > flow_type, > @@ -12374,7 +12380,7 @@ struct cmd_set_hash_global_config_result { > .f =3D cmd_set_hash_global_config_parsed, > .data =3D NULL, > .help_str =3D "set_hash_global_config " > - "toeplitz|simple_xor|default " > + "toeplitz|simple_xor|symmetric_toeplitz|default " > "ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|" > "ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|" > "l2_payload enable|disable", > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 4958713..4968df9 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -220,6 +220,7 @@ enum index { > ACTION_RSS_FUNC_DEFAULT, > ACTION_RSS_FUNC_TOEPLITZ, > ACTION_RSS_FUNC_SIMPLE_XOR, > + ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ, > ACTION_RSS_TYPES, > ACTION_RSS_TYPE, > ACTION_RSS_KEY, > @@ -2457,7 +2458,8 @@ static int comp_vc_action_rss_queue(struct context > *, const struct token *, > .next =3D NEXT(action_rss, > NEXT_ENTRY(ACTION_RSS_FUNC_DEFAULT, > ACTION_RSS_FUNC_TOEPLITZ, > - ACTION_RSS_FUNC_SIMPLE_XOR)), > + ACTION_RSS_FUNC_SIMPLE_XOR, > + > ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ)), > }, > [ACTION_RSS_FUNC_DEFAULT] =3D { > .name =3D "default", > @@ -2474,6 +2476,11 @@ static int comp_vc_action_rss_queue(struct context > *, const struct token *, > .help =3D "simple XOR hash function", > .call =3D parse_vc_action_rss_func, > }, > + [ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ] =3D { > + .name =3D "symmetric_toeplitz", > + .help =3D "Symmetric Toeplitz hash function", > + .call =3D parse_vc_action_rss_func, > + }, > [ACTION_RSS_LEVEL] =3D { > .name =3D "level", > .help =3D "encapsulation level for \"types\"", > @@ -3588,6 +3595,9 @@ static int comp_vc_action_rss_queue(struct context > *, const struct token *, > case ACTION_RSS_FUNC_SIMPLE_XOR: > func =3D RTE_ETH_HASH_FUNCTION_SIMPLE_XOR; > break; > + case ACTION_RSS_FUNC_SYMMETRIC_TOEPLITZ: > + func =3D RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ; > + break; > default: > return -1; > } > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 313e070..6343638 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -3471,7 +3471,7 @@ set_hash_global_config >=20 > Set the global configurations of hash filters:: >=20 > - set_hash_global_config (port_id) (toeplitz|simple_xor|default) \ > + set_hash_global_config (port_id) > (toeplitz|simple_xor|symmetric_toeplitz|default) \ > (ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|ipv6|ipv6-frag= | \ > ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|l2_payload|) \ > (enable|disable) > -- > 1.8.3.1