fix various typos found by Lintian
[dpdk.git] / app / test-pmd / cmdline.c
index a36c505..1375f22 100644 (file)
@@ -95,7 +95,7 @@ static void cmd_help_brief_parsed(__rte_unused void *parsed_result,
                "    help ports                      : Configuring ports.\n"
                "    help registers                  : Reading and setting port registers.\n"
                "    help filters                    : Filters configuration help.\n"
-               "    help traffic_management         : Traffic Management commmands.\n"
+               "    help traffic_management         : Traffic Management commands.\n"
                "    help devices                    : Device related cmds.\n"
                "    help all                        : All of the above sections.\n\n"
        );
@@ -1922,18 +1922,13 @@ cmd_config_rx_tx_parsed(void *parsed_result,
                nb_txq = res->value;
        }
        else if (!strcmp(res->name, "rxd")) {
-               if (res->value <= 0 || res->value > RTE_TEST_RX_DESC_MAX) {
-                       printf("rxd %d invalid - must be > 0 && <= %d\n",
-                                       res->value, RTE_TEST_RX_DESC_MAX);
+               if (check_nb_rxd(res->value) != 0)
                        return;
-               }
                nb_rxd = res->value;
        } else if (!strcmp(res->name, "txd")) {
-               if (res->value <= 0 || res->value > RTE_TEST_TX_DESC_MAX) {
-                       printf("txd %d invalid - must be > 0 && <= %d\n",
-                                       res->value, RTE_TEST_TX_DESC_MAX);
+               if (check_nb_txd(res->value) != 0)
                        return;
-               }
+
                nb_txd = res->value;
        } else {
                printf("Unknown parameter\n");
@@ -2270,9 +2265,14 @@ cmd_config_rss_parsed(void *parsed_result,
        int ret;
 
        if (!strcmp(res->value, "all"))
-               rss_conf.rss_hf = ETH_RSS_IP | ETH_RSS_TCP |
-                               ETH_RSS_UDP | ETH_RSS_SCTP |
-                                       ETH_RSS_L2_PAYLOAD;
+               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;
+       else if (!strcmp(res->value, "eth"))
+               rss_conf.rss_hf = ETH_RSS_ETH;
+       else if (!strcmp(res->value, "vlan"))
+               rss_conf.rss_hf = ETH_RSS_VLAN;
        else if (!strcmp(res->value, "ip"))
                rss_conf.rss_hf = ETH_RSS_IP;
        else if (!strcmp(res->value, "udp"))
@@ -2299,6 +2299,18 @@ cmd_config_rss_parsed(void *parsed_result,
                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, "l2-src-only"))
+               rss_conf.rss_hf = ETH_RSS_L2_SRC_ONLY;
+       else if (!strcmp(res->value, "l2-dst-only"))
+               rss_conf.rss_hf = ETH_RSS_L2_DST_ONLY;
+       else if (!strcmp(res->value, "l2tpv3"))
+               rss_conf.rss_hf = ETH_RSS_L2TPV3;
+       else if (!strcmp(res->value, "esp"))
+               rss_conf.rss_hf = ETH_RSS_ESP;
+       else if (!strcmp(res->value, "ah"))
+               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, "none"))
                rss_conf.rss_hf = 0;
        else if (!strcmp(res->value, "default"))
@@ -2359,7 +2371,8 @@ cmdline_parse_inst_t cmd_config_rss = {
        .f = cmd_config_rss_parsed,
        .data = NULL,
        .help_str = "port config all rss "
-               "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|<flowtype_id>",
+               "all|default|eth|vlan|ip|tcp|udp|sctp|ether|port|vxlan|geneve|"
+               "nvgre|vxlan-gpe|l2tpv3|esp|ah|pfcp|none|<flowtype_id>",
        .tokens = {
                (void *)&cmd_config_rss_port,
                (void *)&cmd_config_rss_keyword,
@@ -2469,7 +2482,9 @@ cmdline_parse_token_string_t cmd_config_rss_hash_key_rss_type =
                                 "ipv4-other#ipv6#ipv6-frag#ipv6-tcp#ipv6-udp#"
                                 "ipv6-sctp#ipv6-other#l2-payload#ipv6-ex#"
                                 "ipv6-tcp-ex#ipv6-udp-ex#"
-                                "l3-src-only#l3-dst-only#l4-src-only#l4-dst-only");
+                                "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");
 cmdline_parse_token_string_t cmd_config_rss_hash_key_value =
        TOKEN_STRING_INITIALIZER(struct cmd_config_rss_hash_key, key, NULL);
 
@@ -2480,7 +2495,9 @@ cmdline_parse_inst_t cmd_config_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|"
-               "l3-src-only|l3-dst-only|l4-src-only|l4-dst-only "
+               "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 "
                "<string of hex digits (variable length, NIC dependent)>",
        .tokens = {
                (void *)&cmd_config_rss_hash_key_port,
@@ -5133,7 +5150,7 @@ cmd_gso_size_parsed(void *parsed_result,
 
        if (test_done == 0) {
                printf("Before setting GSO segsz, please first"
-                               " stop fowarding\n");
+                               " stop forwarding\n");
                return;
        }