From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0068.outbound.protection.outlook.com [157.56.111.68]) by dpdk.org (Postfix) with ESMTP id 0850F5593 for ; Tue, 29 Mar 2016 13:20:50 +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=8OLfaW3rvqpjwN1578kDDFqR4MxPzwuojC4ch7OYJEw=; b=zHGJ4CuxEnXJjLzOOF5lcBtYHPfkkyS4M10JpaszlrbzbRAi8PNWsCWPx+E2twV9PW3IkoPCbBFJV2VGTioco6xxwwVSnNBzs3noKnN5C80xmQtjZ7LVF0Grs+KvxKB5tbTx4saUkQXeoGJNmiItGQZ98dfTkz6ubv/HFAG0nME= 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 (111.93.218.67) by CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) with Microsoft SMTP Server (TLS) id 15.1.447.15; Tue, 29 Mar 2016 11:20:48 +0000 From: Jerin Jacob To: CC: , , Jerin Jacob Date: Tue, 29 Mar 2016 16:50:08 +0530 Message-ID: <1459250409-5123-2-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1459250409-5123-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1459014937-852-1-git-send-email-jerin.jacob@caviumnetworks.com> <1459250409-5123-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0068.INDPRD01.PROD.OUTLOOK.COM (10.164.136.168) To CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) X-MS-Office365-Filtering-Correlation-Id: e3aa1ec2-b11b-478d-1446-08d357c42e9a X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 2:QqHgUCCctrsxNXiTZ/hwscACCbWX9WOFSS9XotkN86Y1XgLQcuw/z2fqSEwJU0RuoRUR+NYuDOZfTIAQr4jAwF70R5daBD0dMc6LJXANY98fAUHhaWivjge1uSK7e4Jwn0n+jpOemDRZ08rgqsgqZb2Pqa4jpLmQ3syVafTwWU7KCdu4pW1pLhsO17JJUsoM; 3:In13G/TupKRyfueJS8fjDVeUhpNcrPBjjYqvMy9Q+CnoLJCSg+ewfI7tt2yhyiSHfQejcV5YoHW4zw7LCOKZggkVbHRw75RuKnLv1kfQQH5r4qR3hXklWpiXm3H8IY2c; 25:qQr4JkDQMMGNubR9YAuYtFOwn+ItOv3w++AHxl42M4atBYtlqHizXMojU0vjim1lX7SkSCZrDhBGfpHNW2mrj66pf3mfvqqF2c/ZaCiNL6GkpotXVBaCxGMEN6sEMgwLQkVpnT63/uttwoBc1yx08lJAhmCOebVK/tUlma8lt5cVXPjPeaXMWiCTJ6t6zv61lbJ9nduQEyPtPVDZLh9cawGeyaoOItxFZacLxk23FcKtCFuVXRGByhrVnyBlh2VWPFcfBiZQUDU29shEKfapquLXgNG9/CQ5HhNV5fGjMAdr6Ntc4lSr+zmuk1GCYlTHigL9Wl/7E4fmfTg27JNCj7h5MXx6BXahirG1Vj5rrxFVDFOxHhBYUVbInwm2W8KbPS20KNkkmmDcvPAOk6XaHE6H0TUAob6Kaadp2j0NSmFJcI4mF+OpsJJc96jhs7GibF3UuGUGKrlJFBvjbcvOohKhrPbdlUYCCpF3BB3HJIVamgTrwiXTgneZNIvXi7telhu9fD7xDWtdokgnr8j67LhxKXRkA7QQenw2T7giOlqM0Cqglgn9N85ftdSCO58UIcBuUgXxrVgXT2+YcHdu+ROt/+AGMD3+9I7ENWL+EO8= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 20:iJJ94bpIabg4g88YKWkJfCF/A4zNpIZ/wibCl2mtNZsa10C/JPgUo3rkA5+VvCLRpCIIhI/a0n992UtTx1iQA9fAXtz+Wly7aKwx7U0PbwkI2TCW2k3EiReAiCONBpYJwKUiB8V33cEfZtTsk5/0mp7HyyTiGmBytdKrRcZSZARu7agsfqNEwSGBI/QO8a12JTwybic+enWwFPITOyrtXhOKDcmjSeWl7X7cPYmK11Ps1SQMZhxVgN/Mcb4Gk3l+CBPQhL5m1glVNSHlA8BFyJpBGYUaFQg32zd6vKUg0wy3e3Q7X+fXDOsiT3+bxryhD0wJK8+O45ZGDEX3QTwIH9o6BgsxgQCDQaA1h27JYF4/Xrr0hj81hpqFWjTX8Of6iRqdIL9PpPx0uLSaWwvxaWob94fqemxVABXMvwkNeCYmSwvQyGEsZXwxAJmBiosEyQwwgHmXOvoXlOLjRd1SxZf9C3zy01UjSxQOTDLwXnoldvutEoXV4I44dLJT3jYF4NfeFsgNA8tKu2YVZyNcYbwvVXQRilcSfpviEXup3JXBfKyVWc1NPRrMIeg/ZSW/bg+/Ha+5jZIKdmvI3LZcFJ88PSbxCFTk8ntcF4DjQv8= 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:CY1PR0701MB1725; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 4:yQwPBfiOPYwvhCztgmc06CoHT8ZPD0tHJ0EIttEy1cvQVZPrb6iqsHzWNeGSehHY6geMup6ANfHGxvwgU2sSGUFLlzNDQ4N9CMxUo9q4SF3Zfec57M48KKfg4U9ZdeKU20UlsLhFbhnbpVvGFdp7oMMi6fcGhhsW9PBg72zBHtrcMoly9fUCaBWq2rvXMmLN65k2C/9+rSX0DGL50Qfo/sL9MdTzT4vP0sluI+9E2I0q9QJuO6p5xFSCcKDyNkeCKxW/13Iwr31LVT2fy3ZJw6ROPAIyW2kP8s3ARoU7um/foc7rVHPayOnMZp8ITVPkMdxwR3/gnpaUAOdJuw0OP7MUmqqtWF5Prz0+NN5RGeMT3SlKlhN/U6+glzsJKN2w X-Forefront-PRVS: 0896BFCE6C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(33646002)(229853001)(19580395003)(92566002)(5008740100001)(36756003)(50986999)(19580405001)(4001430100002)(2351001)(2906002)(86362001)(2950100001)(5009440100003)(5004730100002)(76506005)(53416004)(4326007)(42186005)(586003)(47776003)(3846002)(6116002)(189998001)(107886002)(77096005)(50466002)(81166005)(1096002)(48376002)(50226001)(76176999)(66066001)(110136002)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1725; H:localhost.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1725; 23:v0Qx4gz0VGjBAlCUZzIrgjLzZmNkqIlrKFjVA88?= =?us-ascii?Q?dNmY0YD2ZdasGbnBfBBd3MEtSI+xfLKW6gQbuiRyYa/hVc8W+3swsIHv+CMR?= =?us-ascii?Q?ro8muqK14BYw9N6gxYtsKar8W4jhr7yQbyzSTkEv6chyU4LWtnuNuT+Lg36D?= =?us-ascii?Q?Vwhm00iYYFof/4X3zfh1plmnjyetBVOz9PrS3d+/gA1um36FRQG4UCdiqQWa?= =?us-ascii?Q?pRo2d9aJMhH7c623Obnl9vbUM9rgXBGxQ8/8QewN0ZQJrh5lMQeUM3sI9MKS?= =?us-ascii?Q?1v49/HmLVlvgalTtqJHZRDZvMvPVr0LOX3RkuyEyFMR7yC1ALP2ltrRWSOZS?= =?us-ascii?Q?MWz/Gdhl0wKx7Wvdshmt2tWt3RhagAVFebckxawQKmiza0QX6f0fWqjVqedD?= =?us-ascii?Q?W4nZANwVFmBxBumu+kMCQnIKj3juIno27InwAmZUn3Z81vjRK5rw3xiQXC3K?= =?us-ascii?Q?jAykI8bNBw++uGwk++lN/Vwkgw/GqfkU6EPIBOFOWonxp3nzLEqN19OiYyI4?= =?us-ascii?Q?CYcXRTzQPs4+bCBceFPg38itu06yelyd0c8/fMXqfd1mGUd7Rn/IH8DqPWvn?= =?us-ascii?Q?Rgae6E3c3GY5WGsQQXLtTqGDXkNw3lhKVoWNkE7/yLTOWod8wWjqNfOd94Ms?= =?us-ascii?Q?LKnRHU9ACG57HE6rbFymADx/geltH0qSS84a8OKHSklHH0icS0cYEKEoUBB9?= =?us-ascii?Q?2aGIGosUdUSCPEFn11+2V3DttxEx4//nibPBXmI9bG/lpm9wkDcZSDIlY9dw?= =?us-ascii?Q?CLv6K+gw+YNEC9nHd/k0HWIBypPEo2ZWQlJTl18MtvqbOFdMSPRTelz3y6XT?= =?us-ascii?Q?Tv502efcKRnVRtOjds1gYYS4K7GnuDj0/xk85NEGH36b6PwX4gJ9uBQUwY8K?= =?us-ascii?Q?RvtNjZdBELhnqSWwv8CIXAx01hPuri29LDr+kuy0D/6g/aqtoqyA/UzUhZ8O?= =?us-ascii?Q?CCq0Zq4pDpo1bDJdvB7PGjha1l6Oqux51bR0DXxONV0H3BYM8eBP2hd7OVFc?= =?us-ascii?Q?ijtsbxC3EVHarrhgfO8pcPqlnYe+HLSLoXjdSkHmWJnrMTg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 5:b91KYMPfw7/mTDIZeSpr3PWSOdciY/ZwRMuQkrE5/z19lCXZnYbH0g6yh6vS3N9LylhD9AtLqc723p70bB2CUt2hdYcJk76YvPvNCoLfq1J0mfPL2heHlFESeSsx68+IXw8DT22fMirY5JDIbAzCSg==; 24:mgs7PuecFhRBCCgQgdsiTb5F8Eudf0gRChyTirafEtJHLRiOsdgRHIv1EHB5qkrDK6RS+pELaM+7XC3hMzjfSrJrXzGuxp14LB/oGbHYvdM= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2016 11:20:48.0021 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1725 Subject: [dpdk-dev] [PATCH v2 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: Tue, 29 Mar 2016 11:20:51 -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 +++++++++ lib/librte_ether/rte_eth_ctrl.h | 6 +++++- lib/librte_ether/rte_ethdev.h | 16 +++++++++++++++- 4 files changed, 44 insertions(+), 5 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/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index aabd724..d57e967 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