DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jeff Guo <jia.guo@intel.com>
To: qi.z.zhang@intel.com, qiming.yang@intel.com
Cc: xiaolong.ye@intel.com, dev@dpdk.org, jingjing.wu@intel.com,
	junfeng.guo@intel.com, simei.su@intel.com, jia.guo@intel.com
Subject: [dpdk-dev] [dpdk-dev v3 1/2] app/testpmd: add GTPU to RSS hash commands
Date: Sun, 21 Jun 2020 22:09:26 +0800	[thread overview]
Message-ID: <20200621140927.20602-1-jia.guo@intel.com> (raw)
In-Reply-To: <20200614150819.111089-1-jia.guo@intel.com>

Add testpmd cmdline support for GTPU, it could be used to configure
gtpu teid hash. The commands as below:

testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \
ipv4 / end actions rss types gtpu end  key_len 0 queues end / end

Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
v3->v2:
add gtpu hash
---
 app/test-pmd/cmdline.c | 8 +++++---
 app/test-pmd/config.c  | 4 +++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1ac0b89dd..81c87c8c3 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2274,7 +2274,7 @@ cmd_config_rss_parsed(void *parsed_result,
 		rss_conf.rss_hf = 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;
+			ETH_RSS_AH | ETH_RSS_PFCP | ETH_RSS_GTPU;
 	else if (!strcmp(res->value, "eth"))
 		rss_conf.rss_hf = ETH_RSS_ETH;
 	else if (!strcmp(res->value, "vlan"))
@@ -2319,6 +2319,8 @@ cmd_config_rss_parsed(void *parsed_result,
 		rss_conf.rss_hf = ETH_RSS_PFCP;
 	else if (!strcmp(res->value, "pppoe"))
 		rss_conf.rss_hf = ETH_RSS_PPPOE;
+	else if (!strcmp(res->value, "gtpu"))
+		rss_conf.rss_hf = ETH_RSS_GTPU;
 	else if (!strcmp(res->value, "none"))
 		rss_conf.rss_hf = 0;
 	else if (!strcmp(res->value, "default"))
@@ -2492,7 +2494,7 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type =
 				 "ipv6-tcp-ex#ipv6-udp-ex#"
 				 "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#pppoe");
+				 "l2tpv3#esp#ah#pfcp#pppoe#gtpu");
 cmdline_parse_token_string_t cmd_config_rss_hash_key_value =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
 
@@ -2505,7 +2507,7 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {
 		"l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
 		"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|pppoe "
+		"l2tpv3|esp|ah|pfcp|pppoe|gtpu "
 		"<string of hex digits (variable length, NIC dependent)>",
 	.tokens = {
 		(void *)&cmd_config_rss_hash_key_port,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index a0f8ea9f2..a79019f52 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -77,7 +77,8 @@ static const struct {
 const struct rss_type_info rss_type_table[] = {
 	{ "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},
+		ETH_RSS_L2TPV3 | ETH_RSS_ESP | ETH_RSS_AH | ETH_RSS_PFCP |
+		ETH_RSS_GTPU},
 	{ "none", 0 },
 	{ "eth", ETH_RSS_ETH },
 	{ "l2-src-only", ETH_RSS_L2_SRC_ONLY },
@@ -119,6 +120,7 @@ const struct rss_type_info rss_type_table[] = {
 	{ "l2tpv3", ETH_RSS_L2TPV3 },
 	{ "pfcp", ETH_RSS_PFCP },
 	{ "pppoe", ETH_RSS_PPPOE },
+	{ "gtpu", ETH_RSS_GTPU },
 	{ NULL, 0 },
 };
 
-- 
2.20.1


  reply	other threads:[~2020-06-21 14:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12  2:57 [dpdk-dev] net/ice: enable new input set for rss hash Jeff Guo
2020-06-14 15:08 ` [dpdk-dev] [dpdk-dev v2] " Jeff Guo
2020-06-21 14:09   ` Jeff Guo [this message]
2020-06-21 14:09     ` [dpdk-dev] [dpdk-dev v3 2/2] " Jeff Guo
2020-07-01 13:02       ` Zhang, Qi Z
2020-07-03  3:53         ` Jeff Guo
2020-07-03  3:58       ` [dpdk-dev] [dpdk-dev v4 0/4] enable new hash flow for pf Jeff Guo
2020-07-03  3:58         ` [dpdk-dev] [dpdk-dev v4 1/4] net/ice: refactor for pf hash flow Jeff Guo
2020-07-03  3:58         ` [dpdk-dev] [dpdk-dev v4 2/4] net/ice: support hash for new GTPU protocols Jeff Guo
2020-07-03  3:58         ` [dpdk-dev] [dpdk-dev v4 3/4] net/ice: enable new input set for rss hash Jeff Guo
2020-07-03  3:58         ` [dpdk-dev] [dpdk-dev v4 4/4] app/testpmd: add GTPU to RSS hash commands Jeff Guo
2020-07-07  5:25       ` [dpdk-dev] [dpdk-dev v5 0/4] enable new hash flow for pf Jeff Guo
2020-07-07  5:25         ` [dpdk-dev] [dpdk-dev v5 1/4] net/ice: refactor for pf hash flow Jeff Guo
2020-07-07 14:24           ` Ferruh Yigit
2020-07-07  5:25         ` [dpdk-dev] [dpdk-dev v5 2/4] net/ice: support hash for new GTPU protocols Jeff Guo
2020-07-07  5:25         ` [dpdk-dev] [dpdk-dev v5 3/4] net/ice: enable new input set for rss hash Jeff Guo
2020-07-07  5:25         ` [dpdk-dev] [dpdk-dev v5 4/4] app/testpmd: add GTPU to RSS hash commands Jeff Guo
2020-07-07  9:31         ` [dpdk-dev] [dpdk-dev v5 0/4] enable new hash flow for pf Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200621140927.20602-1-jia.guo@intel.com \
    --to=jia.guo@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=junfeng.guo@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=simei.su@intel.com \
    --cc=xiaolong.ye@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).