app/testpmd: support extended RSS offload types
authorSimei Su <simei.su@intel.com>
Thu, 2 Jul 2020 05:11:49 +0000 (13:11 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 7 Jul 2020 21:38:27 +0000 (23:38 +0200)
This patch adds testpmd cmdline support for PPPoE.

Signed-off-by: Simei Su <simei.su@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/cmdline.c
app/test-pmd/config.c

index 996a498..1ac0b89 100644 (file)
@@ -2317,6 +2317,8 @@ cmd_config_rss_parsed(void *parsed_result,
                rss_conf.rss_hf = ETH_RSS_AH;
        else if (!strcmp(res->value, "pfcp"))
                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, "none"))
                rss_conf.rss_hf = 0;
        else if (!strcmp(res->value, "default"))
@@ -2490,7 +2492,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");
+                                "l2tpv3#esp#ah#pfcp#pppoe");
 cmdline_parse_token_string_t cmd_config_rss_hash_key_value =
        TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
 
@@ -2503,7 +2505,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 "
+               "l2tpv3|esp|ah|pfcp|pppoe "
                "<string of hex digits (variable length, NIC dependent)>",
        .tokens = {
                (void *)&cmd_config_rss_hash_key_port,
index a7112c9..a0f8ea9 100644 (file)
@@ -118,6 +118,7 @@ const struct rss_type_info rss_type_table[] = {
        { "ah", ETH_RSS_AH },
        { "l2tpv3", ETH_RSS_L2TPV3 },
        { "pfcp", ETH_RSS_PFCP },
+       { "pppoe", ETH_RSS_PPPOE },
        { NULL, 0 },
 };