From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0087.outbound.protection.outlook.com [157.56.110.87]) by dpdk.org (Postfix) with ESMTP id 0A8C73238 for ; Wed, 30 Mar 2016 22:51:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=a50NO9FUj6l/6oUSK3Cu//3lx5faZuIXTVzZpFFTFYE=; b=qT2TWSlcAxgTSt+eoCqX3DozCLnzsPyVlAHlAwhvS64llwqab7xpYX8C3rnfe6nML7mXzhHPHhvLqjZLfuKRC928ElXnt8U5l/ct5/zYbYukUzMvKD2U6kWHVM0Y1fz6x2zkGseaM81K51a6Jux9ExaqeCxQIPdAJR0ez+FnZsk= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.caveonetworks.com (122.166.158.190) by BN3PR0701MB1717.namprd07.prod.outlook.com (10.163.39.16) with Microsoft SMTP Server (TLS) id 15.1.447.15; Wed, 30 Mar 2016 20:51:49 +0000 From: Jerin Jacob To: CC: , , , , Jerin Jacob Date: Thu, 31 Mar 2016 02:21:02 +0530 Message-ID: <1459371063-7376-2-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1459371063-7376-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1459250409-5123-2-git-send-email-jerin.jacob@caviumnetworks.com> <1459371063-7376-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.166.158.190] X-ClientProxiedBy: MAXPR01CA0003.INDPRD01.PROD.OUTLOOK.COM (10.164.147.10) To BN3PR0701MB1717.namprd07.prod.outlook.com (10.163.39.16) X-MS-Office365-Filtering-Correlation-Id: 2ec488cb-f517-482b-2764-08d358dd1ebc X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 2:/qG0UJeNczs0KCuw9klQa9LkDujMhdyHJV0Jy3vPFqbFXNwedEGeavsgq3kbtRvIacDFXIrJjfWt9AC/cPU7eBDpkWI/H3d5aaCf7ELph0tjjqV1mq+sWy/3xVpJornhQaAi0EzMewad2kiBvNKEFcfHDNze4Y534hACKvx30flUaoaEEFY0jqG1hINZPrST; 3:EiGsy1/5ccJ8FOoiOTr1xSiG5jVCyFxfrCYawQPQ8KJfZvuu6SkrDPvQR5BsgeF1uFmY70Hm9xqckyKEFPYQoFXkjsbn8Lw6MeBn71rtNoBlsVpZMlzv2GlRXrHWI79E X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1717; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 25:GotKApiHtfv8av2SfOMcYZAXKspxwCj9YtI2Lph94uo+VMqyU3e4b/h5kT/xCHIIMjGZqSK8QD6R+raIS1AuqQtFlaWnyoCEtIF2oQc/cVM3k2aewrHwe5afAUJav3wQOO6829Mb3CcJdGDg0AtEmLDI3Foh8pxH09ok03FhylCGridin2kgGajSX0Gsj+oiV8hHSF8zXt8pis1XnRN0p/SXIeendf+c8kqSMxbth42epP70V292R39pDeYqpCGtlkklXMdmSHzq0LhQoXVZ2S2FwH9+u8rmbGhZV3w/7X1kPpgmGW94OUvx1yBlwgQPDMTQnp5sJ/boGDSfIYbqtNnyPKbuofRouk8M6NZ3myOUQc/ybg70I83rMZNlJX+dM0xP6S2ueOTaM0GwNtTjYHP+cAbJ875InIs8cYm0PP+AzJqC38zf8cZokHJhAiABITrKYx328ytOM5mwC/i5qs2XyLZ87qiMPJq21OIM37rhy0vsUUV+IbCKIi83PFFgHqi8O+ellrCrE5qDj9CVl59WDODuJeio+yBamYpGQ4/VBTLMdUUBq6MoibJa+OQQ8KSbU6ZwIogYaQsnO9hIXPVGPL1eNbwxAvsjahzRL3J7jZlkdsNW9WNJMuDXN8lxF4cPDKcLJ+1jeq24Dt3kzQ== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 20:8TcBSzmXy1FJi+3O9bps/CoXm0Hum2EPl2LMYEcpUJObkoonOwIMq7oeIlT4I/V9VyFsm1jucng2j0JeuRVPJCg+MTlxFZ5Qd3YaRieioH8nSK1TSamKBMgHE2+0ohme0LXgRrfsO45QyyvcyVPUTBCb12yos4/1NE/yFFNEh+5JnVXzxPIZ/rT7HahF8zl0fGFv3RnJvoXMEssL3O3gyVi7/onf70CBS4GkupxX+z2p09wQwQybNy1JlrphoTOju28VOBje3AB+qJANdo4E8aU6Lfgz2Cs6BePbkeWrzfxDzPzus/jkEMw/YyknA4hxVamr2r1ReBN8ds35RtsdrPDvO/b0lSOie8Y3NSWDuN4OrUxzeqksYtZmoMeOf1skM88yWTlk9zVR00QdzFsXpYTKf1KVpxplR/EpEdMdmNRFlJ+PhlE+ZkxEtJ+l47UJlR3kkirTjQuC09K6oan39VywuOp6Vg1MJO+PXOaO4FDdIV1mkHe5TeR9nfg5iZjkbtUzNuZQxS3xee29/ve1JGJ8b28FgSqAtb17hymQ20U6E4y4Wa7aqE2ok2tnsoG6cPvpYwj3emECd889psPDi/8Ng//+NL6gNJ/yNr7/XHI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BN3PR0701MB1717; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1717; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 4:EV8OFtbowLLlXw1GDgREDX6f67IaIu4Du+sQhayscpQl6lUTItilZJmofbN8h1qzqqaelwD236iJ7K5ltQA3T2fPhut2iZCsGy6nxCdEvY7MxAXu8amaT0ipbs6CETuXNR+64DtubGZDWXw/9r64JA6XH+3K3RnmPCMOka6sW8mmnGVN1KwwDjd0b1UZHTb38Wo3uH5fzHC9QxwF4CAanmim2HoYK2wDb+jB4UBYmtENifVTKyuCOFBPwTIrGOFFIzOo/clIO5Q4cKcxii3gosc7EgR+m3abVLDPX7jaszbfEey3gOnh5StCBWV8Vinb35GIorbwUx3dv2NcHA8Yy0dbI3wu3l6Dg34Ef6sHTMPY/5stniaX51VJs7zHM5ye X-Forefront-PRVS: 08978A8F5C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(189998001)(107886002)(110136002)(81166005)(4001430100002)(50226001)(48376002)(76176999)(47776003)(36756003)(66066001)(5008740100001)(2950100001)(2906002)(4326007)(86362001)(77096005)(5004730100002)(19580395003)(1096002)(19580405001)(586003)(6116002)(3846002)(53416004)(2351001)(92566002)(33646002)(229853001)(50986999)(50466002)(42186005)(76506005); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1717; H:localhost.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 23:1k+41cq4VKrz8ZEvhsDaDYbfKCIeonrRnkH+jamoqU7y3TqvXzyBrtGXay5NxHg/d/9uAEDdXCgLXpebrhxRDMp/hFSYfpwo03e5XynPHCPQ6LXWLEW2pwyYG92Qf7+iGhlXWobTCIbt51UcRvvjW8G9+HE01J4At7lYqdjETEGswPsYTpgCVdGdWaXG/YDUdYEHzSq4jfuYZaS/MEvUbkYZD73GbbPxbcaoHxeyotw+zLbj9fNiQImYZZ3GWPa4tnglTg5563jfP3XIVeS00mL5PVtsQJeC5Vm/PrL38O21rdFaguuLei2765zs8ydgSCDMnwEBnk4S4tb9OunmM8f61fXd5vBEZzNcqWngekQhvHWIKWl6sP+w9ynPa/2C9uUMMRo5/3Qo/MZUGya6OeaFCeDwk0dnsnEBpvdPcLqZu1GvK6CLraHaEtvmzneaZwSAzFpWgVWTem+lzaUT5p1i7P3O4EWSkZS2bfrDESQbSlbtmf4xDTrrQwrhEf/KuuXK0hSfgxXhoSXqKoDWrKGRPLYUQNnUsnoe2AoSe2lrTQckkqnh9SySxqcJAwu4h6Ndv9O2IL0sLlASjq+yn2pw5Sbbg0L8USm0iF6fzluM060hfvFUZwryOUaaslsEn6LmeKzI0WTK/IhK1UvKEhuWe0ylrakzQ7dpquGcH6WUviGW6m06Juk9L/YeOLTUtrRQ18qqqOpzlBXvWbnG/xGVGaIydLOhK3ALdr0DdijS/0IOeduwPZd6pfQidydnZKzzuse4u3MCSwtTseWvTOwtxtfDBz62rHV5YrcYbbZc6elfMrLOS7fUXwKN4PKOAn2L3n4OgigIaDvyliCqAS3i26oOMIJfmwDn5X1rM35GdUcOpAD3DhIbHvUP6uVsgJQzEKDLGVLsvE+2MnrWjMVNhZtE0ov9gOrMPiTUX6uFPJvkoXGNedNL9nsDJoJk X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 5:UUbjLRKD9thBBVsQ8IPkOnVKQNdcY0Oe6blb2Di7xHNhm38fLhTFM1egJTWCZBZ0Fglf6RKc1Fm9hbnpVk3sZtlkkPAbbv0iAS9CQ9fNT9he9pnA7+pYQTK4Ei20X8m2yRaZ5Tgr0RSn8AMbJ/IJpA==; 24:5GJ3GWtGhp9aaBPRJwTmVpAXDFA5PAikHBN/fynXFOAypyWg8lkn0K+mO3pVxrw5YvXsmf+lvA8BClBg6RhD5XHv6SyU147maSII5ESqgQA= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2016 20:51:49.1191 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1717 Subject: [dpdk-dev] [PATCH v3 1/2] ethdev: add tunnel and port RSS offload types X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Mar 2016 20:51:53 -0000 - added VXLAN, GENEVE and NVGRE tunnel flow types - added PORT flow type for accounting physical/virtual port or channel number in flow creation Signed-off-by: Jerin Jacob --- app/test-pmd/cmdline.c | 18 +++++++++++++++--- app/test-pmd/config.c | 9 +++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 +++++- lib/librte_ether/rte_eth_ctrl.h | 6 +++++- lib/librte_ether/rte_ethdev.h | 16 +++++++++++++++- 5 files changed, 49 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 93203f4..5fe8239 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -565,7 +565,7 @@ static void cmd_help_long_parsed(void *parsed_result, " Set crc-strip/rx-checksum/hardware-vlan/drop_en" " for ports.\n\n" - "port config all rss (all|ip|tcp|udp|sctp|ether|none)\n" + "port config all rss (all|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none)\n" " Set the RSS mode.\n\n" "port config port-id rss reta (hash,queue)[,(hash,queue)]\n" @@ -1545,6 +1545,14 @@ cmd_config_rss_parsed(void *parsed_result, rss_conf.rss_hf = ETH_RSS_SCTP; else if (!strcmp(res->value, "ether")) rss_conf.rss_hf = ETH_RSS_L2_PAYLOAD; + else if (!strcmp(res->value, "port")) + rss_conf.rss_hf = ETH_RSS_PORT; + else if (!strcmp(res->value, "vxlan")) + rss_conf.rss_hf = ETH_RSS_VXLAN; + else if (!strcmp(res->value, "geneve")) + rss_conf.rss_hf = ETH_RSS_GENEVE; + else if (!strcmp(res->value, "nvgre")) + rss_conf.rss_hf = ETH_RSS_NVGRE; else if (!strcmp(res->value, "none")) rss_conf.rss_hf = 0; else { @@ -1566,12 +1574,12 @@ cmdline_parse_token_string_t cmd_config_rss_name = TOKEN_STRING_INITIALIZER(struct cmd_config_rss, name, "rss"); cmdline_parse_token_string_t cmd_config_rss_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rss, value, - "all#ip#tcp#udp#sctp#ether#none"); + "all#ip#tcp#udp#sctp#ether#port#vxlan#geneve#nvgre#none"); cmdline_parse_inst_t cmd_config_rss = { .f = cmd_config_rss_parsed, .data = NULL, - .help_str = "port config all rss all|ip|tcp|udp|sctp|ether|none", + .help_str = "port config all rss all|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none", .tokens = { (void *)&cmd_config_rss_port, (void *)&cmd_config_rss_keyword, @@ -9304,6 +9312,10 @@ flowtype_to_str(uint16_t ftype) {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP}, {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER}, {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD}, + {"port", RTE_ETH_FLOW_PORT}, + {"vxlan", RTE_ETH_FLOW_VXLAN}, + {"geneve", RTE_ETH_FLOW_GENEVE}, + {"nvgre", RTE_ETH_FLOW_NVGRE}, }; for (i = 0; i < RTE_DIM(ftype_table); i++) { diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index b1bbec6..0b3619d 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -137,6 +137,11 @@ static const struct rss_type_info rss_type_table[] = { { "ipv6-ex", ETH_RSS_IPV6_EX }, { "ipv6-tcp-ex", ETH_RSS_IPV6_TCP_EX }, { "ipv6-udp-ex", ETH_RSS_IPV6_UDP_EX }, + { "port", ETH_RSS_PORT }, + { "vxlan", ETH_RSS_VXLAN }, + { "geneve", ETH_RSS_GENEVE }, + { "nvgre", ETH_RSS_NVGRE }, + }; static void @@ -2028,6 +2033,10 @@ flowtype_to_str(uint16_t flow_type) {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP}, {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER}, {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD}, + {"port", RTE_ETH_FLOW_PORT}, + {"vxlan", RTE_ETH_FLOW_VXLAN}, + {"geneve", RTE_ETH_FLOW_GENEVE}, + {"nvgre", RTE_ETH_FLOW_NVGRE}, }; for (i = 0; i < RTE_DIM(flowtype_str_table); i++) { diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 94fba6a..e8839c2 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -177,6 +177,10 @@ For example: ipv6-sctp ipv6-other l2_payload + port + vxlan + geneve + nvgre show port rss reta ~~~~~~~~~~~~~~~~~~ @@ -1258,7 +1262,7 @@ port config - RSS Set the RSS (Receive Side Scaling) mode on or off:: - testpmd> port config all rss (all|ip|tcp|udp|sctp|ether|none) + testpmd> port config all rss (all|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none) RSS is on by default. diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index b8c7be9..8afbd92 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -74,7 +74,11 @@ extern "C" { #define RTE_ETH_FLOW_IPV6_EX 15 #define RTE_ETH_FLOW_IPV6_TCP_EX 16 #define RTE_ETH_FLOW_IPV6_UDP_EX 17 -#define RTE_ETH_FLOW_MAX 18 +#define RTE_ETH_FLOW_PORT 18 +#define RTE_ETH_FLOW_VXLAN 19 +#define RTE_ETH_FLOW_GENEVE 20 +#define RTE_ETH_FLOW_NVGRE 21 +#define RTE_ETH_FLOW_MAX 22 /** * Feature filter types diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index e7de34a..a4eeeba 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -406,6 +406,10 @@ struct rte_eth_rss_conf { #define ETH_RSS_IPV6_EX (1ULL << RTE_ETH_FLOW_IPV6_EX) #define ETH_RSS_IPV6_TCP_EX (1ULL << RTE_ETH_FLOW_IPV6_TCP_EX) #define ETH_RSS_IPV6_UDP_EX (1ULL << RTE_ETH_FLOW_IPV6_UDP_EX) +#define ETH_RSS_PORT (1ULL << RTE_ETH_FLOW_PORT) +#define ETH_RSS_VXLAN (1ULL << RTE_ETH_FLOW_VXLAN) +#define ETH_RSS_GENEVE (1ULL << RTE_ETH_FLOW_GENEVE) +#define ETH_RSS_NVGRE (1ULL << RTE_ETH_FLOW_NVGRE) #define ETH_RSS_IP ( \ ETH_RSS_IPV4 | \ @@ -430,6 +434,12 @@ struct rte_eth_rss_conf { ETH_RSS_NONFRAG_IPV4_SCTP | \ ETH_RSS_NONFRAG_IPV6_SCTP) +#define ETH_RSS_TUNNEL ( \ + ETH_RSS_VXLAN | \ + ETH_RSS_GENEVE | \ + ETH_RSS_NVGRE) + + /**< Mask of valid RSS hash protocols */ #define ETH_RSS_PROTO_MASK ( \ ETH_RSS_IPV4 | \ @@ -447,7 +457,11 @@ struct rte_eth_rss_conf { ETH_RSS_L2_PAYLOAD | \ ETH_RSS_IPV6_EX | \ ETH_RSS_IPV6_TCP_EX | \ - ETH_RSS_IPV6_UDP_EX) + ETH_RSS_IPV6_UDP_EX | \ + ETH_RSS_PORT | \ + ETH_RSS_VXLAN | \ + ETH_RSS_GENEVE | \ + ETH_RSS_NVGRE) /* * Definitions used for redirection table entry size. -- 2.1.0