From: Maciej Czekaj Date: Fri, 22 Apr 2016 14:51:19 +0000 (+0200) Subject: app/testpmd: add scatter enabling in config command X-Git-Tag: spdx-start~6797 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7903072cac0e67de7449ba352872ba359b3b0f20;p=dpdk.git app/testpmd: add scatter enabling in config command "port config all scatter on|off" allows for controlling rxmode.enable_scatter in command line. Signed-off-by: Maciej Czekaj Acked-by: Pablo de Lara --- diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index c5b94797e3..929d19af45 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -559,10 +559,10 @@ static void cmd_help_long_parsed(void *parsed_result, "port config all max-pkt-len (value)\n" " Set the max packet length.\n\n" - "port config all (crc-strip|rx-cksum|hw-vlan|hw-vlan-filter|" + "port config all (crc-strip|scatter|rx-cksum|hw-vlan|hw-vlan-filter|" "hw-vlan-strip|hw-vlan-extend|drop-en)" " (on|off)\n" - " Set crc-strip/rx-checksum/hardware-vlan/drop_en" + " Set crc-strip/scatter/rx-checksum/hardware-vlan/drop_en" " for ports.\n\n" "port config all rss (all|ip|tcp|udp|sctp|ether|none)\n" @@ -1410,6 +1410,15 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result, printf("Unknown parameter\n"); return; } + } else if (!strcmp(res->name, "scatter")) { + if (!strcmp(res->value, "on")) + rx_mode.enable_scatter = 1; + else if (!strcmp(res->value, "off")) + rx_mode.enable_scatter = 0; + else { + printf("Unknown parameter\n"); + return; + } } else if (!strcmp(res->name, "rx-cksum")) { if (!strcmp(res->value, "on")) rx_mode.hw_ip_checksum = 1; @@ -1487,7 +1496,7 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_all = TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, all, "all"); cmdline_parse_token_string_t cmd_config_rx_mode_flag_name = TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, name, - "crc-strip#rx-cksum#hw-vlan#" + "crc-strip#scatter#rx-cksum#hw-vlan#" "hw-vlan-filter#hw-vlan-strip#hw-vlan-extend"); cmdline_parse_token_string_t cmd_config_rx_mode_flag_value = TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, value, @@ -1496,7 +1505,7 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_value = cmdline_parse_inst_t cmd_config_rx_mode_flag = { .f = cmd_config_rx_mode_flag_parsed, .data = NULL, - .help_str = "port config all crc-strip|rx-cksum|hw-vlan|" + .help_str = "port config all crc-strip|scatter|rx-cksum|hw-vlan|" "hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off", .tokens = { (void *)&cmd_config_rx_mode_flag_port, diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index aed5e47777..f2755cb07e 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -1187,6 +1187,17 @@ CRC stripping is off by default. The ``on`` option is equivalent to the ``--crc-strip`` command-line option. +port config - scatter +~~~~~~~~~~~~~~~~~~~~~~~ + +Set RX scatter mode on or off for all ports:: + + testpmd> port config all scatter (on|off) + +RX scatter mode is off by default. + +The ``on`` option is equivalent to the ``--enable-scatter`` command-line option. + port config - RX Checksum ~~~~~~~~~~~~~~~~~~~~~~~~~