From: <maciej.czekaj@caviumnetworks.com>
To: <dev@dpdk.org>
Cc: <pablo.de.lara.guarch@intel.com>, <john.mcnamara@intel.com>,
Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH v2 2/3] app/testpmd: extend port config with scatter parameter
Date: Fri, 22 Apr 2016 16:51:19 +0200 [thread overview]
Message-ID: <1461336680-7581-3-git-send-email-maciej.czekaj@caviumnetworks.com> (raw)
In-Reply-To: <1461319098-22632-1-git-send-email-maciej.czekaj@caviumnetworks.com>
From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
"port config all scatter on|off" allows for
controlling rxmode.enable_scatter in command line.
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
---
app/test-pmd/cmdline.c | 17 +++++++++++++----
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 11 +++++++++++
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index c5b9479..929d19a 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 aed5e47..f2755cb 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
~~~~~~~~~~~~~~~~~~~~~~~~~
--
1.9.1
next prev parent reply other threads:[~2016-04-22 14:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-22 9:58 [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests maciej.czekaj
2016-04-22 9:58 ` [dpdk-dev] [PATCH 1/3] app/testpmd: add "enable-scatter" parameter maciej.czekaj
2016-04-22 9:58 ` [dpdk-dev] [PATCH 2/3] app/testpmd: extend port config with scatter parameter maciej.czekaj
2016-04-22 9:58 ` [dpdk-dev] [PATCH 3/3] app/testpmd: support setting up txq_flags value in command line maciej.czekaj
2016-04-22 10:19 ` [dpdk-dev] [PATCH 0/3] testpmd: extend commands for better scatter-gather tests Mcnamara, John
2016-04-22 10:38 ` [dpdk-dev] Odp.: " Czekaj, Maciej
2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 " maciej.czekaj
2016-04-28 8:52 ` De Lara Guarch, Pablo
2016-04-28 12:09 ` Maciej Czekaj
2016-04-28 13:13 ` De Lara Guarch, Pablo
2016-04-28 13:19 ` Maciej Czekaj
2016-06-08 10:38 ` Thomas Monjalon
2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 1/3] app/testpmd: add "enable-scatter" parameter maciej.czekaj
2016-04-22 14:51 ` maciej.czekaj [this message]
2016-04-22 14:51 ` [dpdk-dev] [PATCH v2 3/3] app/testpmd: support setting up txq_flags value in command line maciej.czekaj
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=1461336680-7581-3-git-send-email-maciej.czekaj@caviumnetworks.com \
--to=maciej.czekaj@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=john.mcnamara@intel.com \
--cc=pablo.de.lara.guarch@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).