summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimei Su <simei.su@intel.com>2019-10-15 23:09:49 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-20 15:43:28 +0100
commite3df81e4f7588cf5cf4e50cac9d740b44291fb2b (patch)
tree34f89f8a12eb518ea5c48229cb2e99725d9d7dc8
parent5dfcb946434ebbd7d170c44dcd7c1c98bf769ac8 (diff)
downloaddpdk-next-net-intel-e3df81e4f7588cf5cf4e50cac9d740b44291fb2b.zip
dpdk-next-net-intel-e3df81e4f7588cf5cf4e50cac9d740b44291fb2b.tar.gz
dpdk-next-net-intel-e3df81e4f7588cf5cf4e50cac9d740b44291fb2b.tar.xz
app/testpmd: support extended RSS offload types
This patch adds cmdline support for extended rss types configuration. Signed-off-by: Simei Su <simei.su@intel.com> Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
-rw-r--r--app/test-pmd/cmdline.c14
-rw-r--r--app/test-pmd/config.c4
2 files changed, 16 insertions, 2 deletions
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index ffc8b70..368d4bb 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2205,6 +2205,14 @@ cmd_config_rss_parsed(void *parsed_result,
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, "l3-src-only"))
+ rss_conf.rss_hf = ETH_RSS_L3_SRC_ONLY;
+ else if (!strcmp(res->value, "l3-dst-only"))
+ rss_conf.rss_hf = ETH_RSS_L3_DST_ONLY;
+ else if (!strcmp(res->value, "l4-src-only"))
+ rss_conf.rss_hf = ETH_RSS_L4_SRC_ONLY;
+ else if (!strcmp(res->value, "l4-dst-only"))
+ rss_conf.rss_hf = ETH_RSS_L4_DST_ONLY;
else if (!strcmp(res->value, "none"))
rss_conf.rss_hf = 0;
else if (!strcmp(res->value, "default"))
@@ -2372,7 +2380,8 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type =
"ipv4#ipv4-frag#ipv4-tcp#ipv4-udp#ipv4-sctp#"
"ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#"
"ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#"
- "ipv6-tcp-ex#ipv6-udp-ex");
+ "ipv6-tcp-ex#ipv6-udp-ex#"
+ "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only");
cmdline_parse_token_string_t cmd_config_rss_hash_key_value =
TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
@@ -2382,7 +2391,8 @@ cmdline_parse_inst_t cmd_config_rss_hash_key = {
.help_str = "port config <port_id> rss-hash-key "
"ipv4|ipv4-frag|ipv4-tcp|ipv4-udp|ipv4-sctp|ipv4-other|"
"ipv6|ipv6-frag|ipv6-tcp|ipv6-udp|ipv6-sctp|ipv6-other|"
- "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex "
+ "l2-payload|ipv6-ex|ipv6-tcp-ex|ipv6-udp-ex|"
+ "l3-src-only|l3-dst-only|l4-src-only|l4-dst-only "
"<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 1844e48..efe2812 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -103,6 +103,10 @@ const struct rss_type_info rss_type_table[] = {
{ "tcp", ETH_RSS_TCP },
{ "sctp", ETH_RSS_SCTP },
{ "tunnel", ETH_RSS_TUNNEL },
+ { "l3-src-only", ETH_RSS_L3_SRC_ONLY },
+ { "l3-dst-only", ETH_RSS_L3_DST_ONLY },
+ { "l4-src-only", ETH_RSS_L4_SRC_ONLY },
+ { "l4-dst-only", ETH_RSS_L4_DST_ONLY },
{ NULL, 0 },
};