From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0063.outbound.protection.outlook.com [207.46.100.63]) by dpdk.org (Postfix) with ESMTP id D0921C3C6 for ; Wed, 22 Jun 2016 15:03:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rKXIkbvxvPcSZ2enEUSNfYFAGSeLaubQKNzBFmnMzJA=; b=UrdQfbgvTXeNZp/UvGulMP1T4R7bs0jZQkJ4YUPNey9QDqRfV2ZA+43p7irxH/XHnZqf04E9WS0GDFoX0sL0tA/XSTrDzYqpwsddNrl9ceDfvIr5SCGnCsmQhqhbzxj5RMBiCSM6XR1g2pImTY7sSKaSPK8RpH8D2RJ56gi1Cqs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (122.171.182.251) by BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) with Microsoft SMTP Server (TLS) id 15.1.523.12; Wed, 22 Jun 2016 13:03:50 +0000 From: Jerin Jacob To: CC: , , Jerin Jacob Date: Wed, 22 Jun 2016 18:33:20 +0530 Message-ID: <1466600601-27682-2-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466600601-27682-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1459371063-7376-2-git-send-email-jerin.jacob@caviumnetworks.com> <1466600601-27682-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.171.182.251] X-ClientProxiedBy: MA1PR01CA0055.INDPRD01.PROD.OUTLOOK.COM (10.164.116.155) To BN3PR0701MB1720.namprd07.prod.outlook.com (10.163.39.19) X-MS-Office365-Filtering-Correlation-Id: 16653f06-233e-424f-e9d7-08d39a9da882 X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 2:bpIEvc2WAzCNXOyMoB4PmqoKbBujMuBLJsQ/uCLuZMGS7zwhI5+JvauuyzrlbIfOcYrUWMFbs6sg94TZp8RMb3eqofe/8t0a7FFsaU6cfhqrnwtsZsjxivQTHCDNfDby2VYf0ydEqrNVvm+oZW22MD1eNZzRuXJuUjKbHleb/0yUU/N/TWAmtc5tEFQH8pvu; 3:PYdkPJmUa9pa5SQcNIoUqV7zVT755k0QyO9BNxRXnn+ZDuJQj1q5kAv8xCzDw0VeDVg6QIdWSd6G10WUJWzI7C4JiOzWmYgfv35Y6rheA2wmop9JOOzjRtQ7sjgzOMHT; 25:MKUNHEc9S1qNTJOjg+OabP6poSNFcY03dtdBWgPLcq1lYF68kOPaw2qgfCIZ94B4PcCX/CmBwbFDkzC6xjjo5lEEid+qHs3JBlzaJhJ6dN9hWpEkKQPW6rR0ESRxrtUawYztYsAJWnzpvln1FL8QkA52O43pkCV3KSiX36wYfKH5PtX3xG5pC2OiLSOqwDqvj59ahUJhMEBvDxESf/EDxg5aQLA/DFwguCPYblvhpsRfGiQNat+I5r4vLqPwSk8wOCBZwFlQjiWA6sSwNQpdM8PS3zQFKJnKg6Qndqo9XpsZLXodEFz/UVDDd7Rezm/bC78gxsjmgOPZCtrtaE7Zt9aG178/RlA+2EW2Gci5T0Oerv8ktFTV4QepRu54uQ45wikYGbSj9ETdczD+5NTzti33l9TLbAQaztnJJsKHd1Y= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 20:g+9pYNrhGrrCntvKzBuy0YrpkYo2RHSub/30HsFZpn1pFM/8aA4RxDa7dqOfig2ot8YYjGhQ7JfxuMydJtU9Y0CSJoEaLqV3WngNx7/CFGVhUgozVl9BSxmKHLpLNH6A0aJgqCLbak97enMoX8T2loZ2ZKP9pEzj8WGyTeQizO+O1k2KSNbPJWErhFVv2zhoJaljpCt1KjzMFDc9f9aaEfysIaThjg6lwEo0SeUAVY5jn3W7FGyrCyAL3z6tqcoUCqpD+Z8hKdnrjWOEnwXauFyYbYiPte/SFyegLbYVf6CaVd3qyi6lOUQ6Oxjqg5/aY9kqRO/FqBEfK2Z7F2KgUirLXFP1AOEeEFQnTuuLM2CqfM3Wm6r2YV4tLnht4hguuSx35uKW8EBhSDn22uuNKQW4GPc//Dv8NhSDgTpwPif/HhY+YCJo7CvYXDGdZ2JbA1xqRDUQQVKQ8olZheuDyfA6A067BTkIn0fiMLb43a6SnkiIzlc8IihReC7riF4Bo4NQM6uivOocAY4MTShewOXv3wFfOalMW2pMXpEcqkNKC8TibaOMBnhS072U4JX9Hcg1qSdVKvtEDSP8GGDEEZTZcEPD1i/9Nf4ljqgkze8= 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)(10201501046)(3002001); SRVR:BN3PR0701MB1720; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1720; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1720; 4:L4LCNtLXGTOWRlQh72Vo+dcod93/rnbJbHHr0xQZSH0XEMTeYvGnHaWZt3dUUg/Fx8NBNqJEul39sOSTs1TXnZvlWgfAlQiOHnynoUp5/LoKAF5FexDdVKAlK6g0YI+SJoOSXbkjyn/jKX7jx/vCzBjFHMPkxAVpOfcHdaYWr4IPhQjPiF54+L9yTF6Q5CT6fnqpYhSp5RLUC9Z3j3xjLiaKvAeOI7HrKXe4WiNfMdEo8L54k5HkLTE43UssjYA+z8S+q4d1cE0Iy8tPlW0aiLahHL87wcNrQiJW+92s9jW3WeOFXtjWsbDGN94vRIVZwxwPFRgoitvO6hB97rIgljOrNnkTwQkPZmcsAMx1xAda0evLWNxz4A4V4yAwI0um X-Forefront-PRVS: 0981815F2F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(7846002)(5003940100001)(586003)(6116002)(7736002)(4326007)(3846002)(66066001)(4001430100002)(68736007)(107886002)(97736004)(189998001)(2906002)(33646002)(77096005)(42186005)(36756003)(48376002)(47776003)(92566002)(229853001)(2351001)(50226002)(50466002)(101416001)(2950100001)(8676002)(81166006)(19580395003)(110136002)(81156014)(105586002)(19580405001)(50986999)(106356001)(76176999); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1720; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1720; 23:n42Xu+UHyVyjpHACTkx/GeMnBGpmDtKYRfoEW8R?= =?us-ascii?Q?k+vFnFKwr2G4aQSXYMjQyaNCulveey/68BFr3PFbc1u6Uduazav63JJ5AS0e?= =?us-ascii?Q?IZ74V3L5kWXEUqMJokLfbfWjcQBINt2X/hYaUYOAt+Xg26NqtRs/rGFxfEvI?= =?us-ascii?Q?fsMkxFfts0+a01GglhLEiwxELQSTz6rkJABMNa5xcBD5Ei2TaEn2JGGreXYD?= =?us-ascii?Q?TQH5zHJLSz1ySdx1AbxXI1afC7tfjEkQWeSRC/CXHpyB+FFN32SVwXqq2CDK?= =?us-ascii?Q?HA3dUHv/77uwsYy6YaJXSFteIlgfJzUjgGviuqLyIdk0hZf1IIEtSmO0UkDT?= =?us-ascii?Q?hAII9qnPRLpM/R+iL4yz3gcu4Y8Ky8RhfegVvzcXkAthrIldeGLknX8SVM7i?= =?us-ascii?Q?aVCYOtc8tamY1cI2lMTXRTQJzoVx4F1j3uxZk6DdeoEp8ED593cIBikiU+7J?= =?us-ascii?Q?ozcpj503uR/7icQPBXEpzSFxtw+VnMOZEeVn7ti0lGV5o/4hwbfSfBP2RezC?= =?us-ascii?Q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DhLCBPDsb; 5:nNgHoyBgqY2iJkUcv9y9Q+nZue1PYvRiSZxStWI+zE46K48kb4K2pomcyHEUQnNWokw7BZ2APN4tAuKVEEXOS60bXUZX2g33kmAEEIif/z5u39/J80+tg+iU7UApbVC3gZ+LP5JE4WHWSgZGFCY0Fg==; 24:3CWm3zBSPzo6ZGsF+mE3UtYZYepiew3L5clzO7QXEheiFAB16/3AybBTnPcu7Ks//cTq7Ror3+ZRUrY9NSDdlaYAbKeQr+yQ5ODIWkUW5nw=; 7:xgnUCa5/SGx+FSl+XpWdg8itzBNhmI/PlGdpcUZoPOgCN8ALNqG6vmPvwvrU8XVZ3PsbSfXAc1yFrz5s1tfQpjK/20GhvQsWqOk18oLA3sRUpYr67f51uD6ZWHUN8eTEz5Ty2X1vLmE0WIdsRaXlTgeuLB+sQBdkN3bSdK45OV6VjxCI5vGtkLPzKT5sNyqYr+zx41DZt3Iux1p2wvpJkubCIndrg4s5Mc6ubGJ68s6AQ6GJSoJ68yCwDe0N7m64t7JAY5yzQ+2UIU5JEOnHAg== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2016 13:03:50.0092 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1720 Subject: [dpdk-dev] [PATCH v4 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, 22 Jun 2016 13:03:54 -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 | 7 ++++++- lib/librte_ether/rte_ethdev.h | 16 +++++++++++++++- 5 files changed, 50 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 9d3e4e8..b6b61ad 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/scatter/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" @@ -1552,6 +1552,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 { @@ -1578,12 +1586,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, @@ -9499,6 +9507,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 cb71c09..9ccabf9 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -138,6 +138,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 @@ -2119,6 +2124,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 4e19229..30e410d 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -179,6 +179,10 @@ For example: ipv6-sctp ipv6-other l2_payload + port + vxlan + geneve + nvgre show port rss reta ~~~~~~~~~~~~~~~~~~ @@ -1286,7 +1290,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..c04a488 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -74,7 +74,12 @@ 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 + /**< Physical/virtual port number based flow */ +#define RTE_ETH_FLOW_VXLAN 19 /**< VXLAN protocol based flow */ +#define RTE_ETH_FLOW_GENEVE 20 /**< GENEVE protocol based flow */ +#define RTE_ETH_FLOW_NVGRE 21 /**< NVGRE protocol based flow */ +#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 bd93bf6..1579cb0 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -413,6 +413,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 | \ @@ -437,6 +441,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 | \ @@ -454,7 +464,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.5.5