* [dpdk-dev] [PATCH] testpmd: HW vlan command
@ 2015-02-13 12:03 Ouyang Changchun
2015-03-03 23:52 ` De Lara Guarch, Pablo
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 0/2] Ouyang Changchun
0 siblings, 2 replies; 16+ messages in thread
From: Ouyang Changchun @ 2015-02-13 12:03 UTC (permalink / raw)
To: dev
This patch enables testpmd user can config port hw_vlan with more fine granularity:
hw vlan filter, hw vlan strip, and hw vlan extend.
Don't remove the original command(hw-vlan) considering that some user still want to use
only one command to switch on/off all 3 options.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
---
app/test-pmd/cmdline.c | 36 +++++++++++++++++++++++++++++++++---
app/test-pmd/parameters.c | 18 ++++++++++++++++++
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 590e427..99cc307 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -584,7 +584,8 @@ 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|drop-en)"
+ "port config all (crc-strip|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"
" for ports.\n\n"
@@ -1327,6 +1328,33 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
printf("Unknown parameter\n");
return;
}
+ } else if (!strcmp(res->name, "hw-vlan-filter")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_filter = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_filter = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
+ } else if (!strcmp(res->name, "hw-vlan-strip")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_strip = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_strip = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
+ } else if (!strcmp(res->name, "hw-vlan-extend")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_extend = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_extend = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
} else if (!strcmp(res->name, "drop-en")) {
if (!strcmp(res->value, "on"))
rx_drop_en = 1;
@@ -1355,7 +1383,8 @@ 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#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,
"on#off");
@@ -1363,7 +1392,8 @@ 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 on|off",
+ .help_str = "port config all crc-strip|rx-cksum|hw-vlan|"
+ "hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off",
.tokens = {
(void *)&cmd_config_rx_mode_flag_port,
(void *)&cmd_config_rx_mode_flag_keyword,
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index adf3203..04dc129 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -157,6 +157,9 @@ usage(char* progname)
printf(" --crc-strip: enable CRC stripping by hardware.\n");
printf(" --enable-rx-cksum: enable rx hardware checksum offload.\n");
printf(" --disable-hw-vlan: disable hardware vlan.\n");
+ printf(" --disable-hw-vlan-filter: disable hardware vlan filter.\n");
+ printf(" --disable-hw-vlan-strip: disable hardware vlan strip.\n");
+ printf(" --disable-hw-vlan-extend: disable hardware vlan extend.\n");
printf(" --enable-drop-en: enable per queue packet drop.\n");
printf(" --disable-rss: disable rss.\n");
printf(" --port-topology=N: set port topology (N: paired (default) or "
@@ -528,6 +531,9 @@ launch_args_parse(int argc, char** argv)
{ "crc-strip", 0, 0, 0 },
{ "enable-rx-cksum", 0, 0, 0 },
{ "disable-hw-vlan", 0, 0, 0 },
+ { "disable-hw-vlan-filter", 0, 0, 0 },
+ { "disable-hw-vlan-strip", 0, 0, 0 },
+ { "disable-hw-vlan-extend", 0, 0, 0 },
{ "enable-drop-en", 0, 0, 0 },
{ "disable-rss", 0, 0, 0 },
{ "port-topology", 1, 0, 0 },
@@ -778,6 +784,18 @@ launch_args_parse(int argc, char** argv)
rx_mode.hw_vlan_extend = 0;
}
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-filter"))
+ rx_mode.hw_vlan_filter = 0;
+
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-strip"))
+ rx_mode.hw_vlan_strip = 0;
+
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-extend"))
+ rx_mode.hw_vlan_extend = 0;
+
if (!strcmp(lgopts[opt_idx].name, "enable-drop-en"))
rx_drop_en = 1;
--
1.8.4.2
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] testpmd: HW vlan command
2015-02-13 12:03 [dpdk-dev] [PATCH] testpmd: HW vlan command Ouyang Changchun
@ 2015-03-03 23:52 ` De Lara Guarch, Pablo
2015-03-05 10:48 ` Thomas Monjalon
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 0/2] Ouyang Changchun
1 sibling, 1 reply; 16+ messages in thread
From: De Lara Guarch, Pablo @ 2015-03-03 23:52 UTC (permalink / raw)
To: Ouyang, Changchun, dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ouyang Changchun
> Sent: Friday, February 13, 2015 12:04 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] testpmd: HW vlan command
>
> This patch enables testpmd user can config port hw_vlan with more fine
> granularity:
> hw vlan filter, hw vlan strip, and hw vlan extend.
>
> Don't remove the original command(hw-vlan) considering that some user still
> want to use
> only one command to switch on/off all 3 options.
>
> Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] testpmd: HW vlan command
2015-03-03 23:52 ` De Lara Guarch, Pablo
@ 2015-03-05 10:48 ` Thomas Monjalon
0 siblings, 0 replies; 16+ messages in thread
From: Thomas Monjalon @ 2015-03-05 10:48 UTC (permalink / raw)
To: Ouyang, Changchun; +Cc: dev
2015-03-03 23:52, De Lara Guarch, Pablo:
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ouyang Changchun
> > Sent: Friday, February 13, 2015 12:04 PM
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH] testpmd: HW vlan command
> >
> > This patch enables testpmd user can config port hw_vlan with more fine
> > granularity:
> > hw vlan filter, hw vlan strip, and hw vlan extend.
> >
> > Don't remove the original command(hw-vlan) considering that some user still
> > want to use
> > only one command to switch on/off all 3 options.
> >
> > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Changchun, Pablo, now the rule should be to take care of documentation
and submit the according update in the same patch (if small) or the
same patchset.
Could you make a v2 please?
Thanks
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH v2 0/2]
2015-02-13 12:03 [dpdk-dev] [PATCH] testpmd: HW vlan command Ouyang Changchun
2015-03-03 23:52 ` De Lara Guarch, Pablo
@ 2015-03-06 8:00 ` Ouyang Changchun
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 1/2] testpmd: HW vlan command Ouyang Changchun
` (3 more replies)
1 sibling, 4 replies; 16+ messages in thread
From: Ouyang Changchun @ 2015-03-06 8:00 UTC (permalink / raw)
To: dev
This patch enables testpmd user can config port hw_vlan with more fine granularity:
hw vlan filter, hw vlan strip, and hw vlan extend;
Update testpmd doc accordingly.
Changchun Ouyang (2):
testpmd: HW vlan command
doc: Update for new HW vlan command
app/test-pmd/cmdline.c | 36 ++++++++++++++++++++++++++---
app/test-pmd/parameters.c | 18 +++++++++++++++
doc/guides/testpmd_app_ug/run_app.rst | 12 ++++++++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 33 ++++++++++++++++++++++++++
4 files changed, 96 insertions(+), 3 deletions(-)
--
1.8.4.2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] testpmd: HW vlan command
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 0/2] Ouyang Changchun
@ 2015-03-06 8:00 ` Ouyang Changchun
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 2/2] doc: Update for new " Ouyang Changchun
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: Ouyang Changchun @ 2015-03-06 8:00 UTC (permalink / raw)
To: dev
This patch enables testpmd user can config port hw_vlan with more fine granularity:
hw vlan filter, hw vlan strip, and hw vlan extend.
Don't remove the original command(hw-vlan) considering that some user still want to use
only one command to switch on/off all 3 options.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-pmd/cmdline.c | 36 +++++++++++++++++++++++++++++++++---
app/test-pmd/parameters.c | 18 ++++++++++++++++++
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 590e427..99cc307 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -584,7 +584,8 @@ 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|drop-en)"
+ "port config all (crc-strip|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"
" for ports.\n\n"
@@ -1327,6 +1328,33 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
printf("Unknown parameter\n");
return;
}
+ } else if (!strcmp(res->name, "hw-vlan-filter")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_filter = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_filter = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
+ } else if (!strcmp(res->name, "hw-vlan-strip")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_strip = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_strip = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
+ } else if (!strcmp(res->name, "hw-vlan-extend")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_extend = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_extend = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
} else if (!strcmp(res->name, "drop-en")) {
if (!strcmp(res->value, "on"))
rx_drop_en = 1;
@@ -1355,7 +1383,8 @@ 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#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,
"on#off");
@@ -1363,7 +1392,8 @@ 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 on|off",
+ .help_str = "port config all crc-strip|rx-cksum|hw-vlan|"
+ "hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off",
.tokens = {
(void *)&cmd_config_rx_mode_flag_port,
(void *)&cmd_config_rx_mode_flag_keyword,
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index adf3203..04dc129 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -157,6 +157,9 @@ usage(char* progname)
printf(" --crc-strip: enable CRC stripping by hardware.\n");
printf(" --enable-rx-cksum: enable rx hardware checksum offload.\n");
printf(" --disable-hw-vlan: disable hardware vlan.\n");
+ printf(" --disable-hw-vlan-filter: disable hardware vlan filter.\n");
+ printf(" --disable-hw-vlan-strip: disable hardware vlan strip.\n");
+ printf(" --disable-hw-vlan-extend: disable hardware vlan extend.\n");
printf(" --enable-drop-en: enable per queue packet drop.\n");
printf(" --disable-rss: disable rss.\n");
printf(" --port-topology=N: set port topology (N: paired (default) or "
@@ -528,6 +531,9 @@ launch_args_parse(int argc, char** argv)
{ "crc-strip", 0, 0, 0 },
{ "enable-rx-cksum", 0, 0, 0 },
{ "disable-hw-vlan", 0, 0, 0 },
+ { "disable-hw-vlan-filter", 0, 0, 0 },
+ { "disable-hw-vlan-strip", 0, 0, 0 },
+ { "disable-hw-vlan-extend", 0, 0, 0 },
{ "enable-drop-en", 0, 0, 0 },
{ "disable-rss", 0, 0, 0 },
{ "port-topology", 1, 0, 0 },
@@ -778,6 +784,18 @@ launch_args_parse(int argc, char** argv)
rx_mode.hw_vlan_extend = 0;
}
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-filter"))
+ rx_mode.hw_vlan_filter = 0;
+
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-strip"))
+ rx_mode.hw_vlan_strip = 0;
+
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-extend"))
+ rx_mode.hw_vlan_extend = 0;
+
if (!strcmp(lgopts[opt_idx].name, "enable-drop-en"))
rx_drop_en = 1;
--
1.8.4.2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] doc: Update for new HW vlan command
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 0/2] Ouyang Changchun
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 1/2] testpmd: HW vlan command Ouyang Changchun
@ 2015-03-06 8:00 ` Ouyang Changchun
2015-03-06 8:09 ` [dpdk-dev] [PATCH v2 0/2] Ouyang, Changchun
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd Ouyang Changchun
3 siblings, 0 replies; 16+ messages in thread
From: Ouyang Changchun @ 2015-03-06 8:00 UTC (permalink / raw)
To: dev
Update the testpmd doc as there are new HW VLAN commands/options.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
---
doc/guides/testpmd_app_ug/run_app.rst | 12 +++++++++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 33 +++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 67f62d2..3898e67 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -262,6 +262,18 @@ They must be separated from the EAL options, shown in the previous section, with
Disable hardware VLAN.
+* --disable-hw-vlan-filter
+
+ Disable hardware VLAN filter.
+
+* --disable-hw-vlan-strip
+
+ Disable hardware VLAN strip.
+
+* --disable-hw-vlan-extend
+
+ Disable hardware VLAN extend.
+
* --enable-drop-en
Enable per-queue packet drop for packets with no descriptors.
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 218835a..b644626 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -896,6 +896,39 @@ Hardware VLAN is on by default.
The off option is equivalent to the --disable-hw-vlan command-line option.
+port config - VLAN filter
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware VLAN filter on or off for all ports:
+
+port config all hw-vlan-filter (on|off)
+
+Hardware VLAN filter is on by default.
+
+The off option is equivalent to the --disable-hw-vlan-filter command-line option.
+
+port config - VLAN strip
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware VLAN strip on or off for all ports:
+
+port config all hw-vlan-strip (on|off)
+
+Hardware VLAN strip is on by default.
+
+The off option is equivalent to the --disable-hw-vlan-strip command-line option.
+
+port config - VLAN extend
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware VLAN extend on or off for all ports:
+
+port config all hw-vlan-extend (on|off)
+
+Hardware VLAN extend is off by default.
+
+The off option is equivalent to the --disable-hw-vlan-extend command-line option.
+
port config - Drop Packets
~~~~~~~~~~~~~~~~~~~~~~~~~~
--
1.8.4.2
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/2]
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 0/2] Ouyang Changchun
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 1/2] testpmd: HW vlan command Ouyang Changchun
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 2/2] doc: Update for new " Ouyang Changchun
@ 2015-03-06 8:09 ` Ouyang, Changchun
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd Ouyang Changchun
3 siblings, 0 replies; 16+ messages in thread
From: Ouyang, Changchun @ 2015-03-06 8:09 UTC (permalink / raw)
To: dev
> -----Original Message-----
> From: Ouyang, Changchun
> Sent: Friday, March 6, 2015 4:00 PM
> To: dev@dpdk.org
> Cc: Butler, Siobhan A; De Lara Guarch, Pablo; Cao, Waterman; Ouyang,
> Changchun
> Subject: [PATCH v2 0/2]
>
> This patch enables testpmd user can config port hw_vlan with more fine
> granularity:
> hw vlan filter, hw vlan strip, and hw vlan extend;
>
> Update testpmd doc accordingly.
>
> Changchun Ouyang (2):
> testpmd: HW vlan command
> doc: Update for new HW vlan command
>
> app/test-pmd/cmdline.c | 36 ++++++++++++++++++++++++++---
> app/test-pmd/parameters.c | 18 +++++++++++++++
> doc/guides/testpmd_app_ug/run_app.rst | 12 ++++++++++
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 33
> ++++++++++++++++++++++++++
> 4 files changed, 96 insertions(+), 3 deletions(-)
>
> --
> 1.8.4.2
Self-nack it, due to missing subject.
Will send a v3 patch set.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 0/2] Ouyang Changchun
` (2 preceding siblings ...)
2015-03-06 8:09 ` [dpdk-dev] [PATCH v2 0/2] Ouyang, Changchun
@ 2015-03-06 8:10 ` Ouyang Changchun
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 1/2] testpmd: HW vlan command Ouyang Changchun
` (2 more replies)
3 siblings, 3 replies; 16+ messages in thread
From: Ouyang Changchun @ 2015-03-06 8:10 UTC (permalink / raw)
To: dev
This patch enables testpmd user can config port hw_vlan with more fine granularity:
hw vlan filter, hw vlan strip, and hw vlan extend;
Update testpmd doc accordingly.
Changchun Ouyang (2):
testpmd: HW vlan command
doc: Update for new HW vlan command
app/test-pmd/cmdline.c | 36 ++++++++++++++++++++++++++---
app/test-pmd/parameters.c | 18 +++++++++++++++
doc/guides/testpmd_app_ug/run_app.rst | 12 ++++++++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 33 ++++++++++++++++++++++++++
4 files changed, 96 insertions(+), 3 deletions(-)
--
1.8.4.2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH v3 1/2] testpmd: HW vlan command
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd Ouyang Changchun
@ 2015-03-06 8:10 ` Ouyang Changchun
2015-03-06 8:22 ` Qiu, Michael
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 2/2] doc: Update for new " Ouyang Changchun
2015-03-09 11:23 ` [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd Thomas Monjalon
2 siblings, 1 reply; 16+ messages in thread
From: Ouyang Changchun @ 2015-03-06 8:10 UTC (permalink / raw)
To: dev
This patch enables testpmd user can config port hw_vlan with more fine granularity:
hw vlan filter, hw vlan strip, and hw vlan extend.
Don't remove the original command(hw-vlan) considering that some user still want to use
only one command to switch on/off all 3 options.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-pmd/cmdline.c | 36 +++++++++++++++++++++++++++++++++---
app/test-pmd/parameters.c | 18 ++++++++++++++++++
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 590e427..99cc307 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -584,7 +584,8 @@ 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|drop-en)"
+ "port config all (crc-strip|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"
" for ports.\n\n"
@@ -1327,6 +1328,33 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
printf("Unknown parameter\n");
return;
}
+ } else if (!strcmp(res->name, "hw-vlan-filter")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_filter = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_filter = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
+ } else if (!strcmp(res->name, "hw-vlan-strip")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_strip = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_strip = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
+ } else if (!strcmp(res->name, "hw-vlan-extend")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_extend = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_extend = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
} else if (!strcmp(res->name, "drop-en")) {
if (!strcmp(res->value, "on"))
rx_drop_en = 1;
@@ -1355,7 +1383,8 @@ 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#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,
"on#off");
@@ -1363,7 +1392,8 @@ 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 on|off",
+ .help_str = "port config all crc-strip|rx-cksum|hw-vlan|"
+ "hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off",
.tokens = {
(void *)&cmd_config_rx_mode_flag_port,
(void *)&cmd_config_rx_mode_flag_keyword,
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index adf3203..04dc129 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -157,6 +157,9 @@ usage(char* progname)
printf(" --crc-strip: enable CRC stripping by hardware.\n");
printf(" --enable-rx-cksum: enable rx hardware checksum offload.\n");
printf(" --disable-hw-vlan: disable hardware vlan.\n");
+ printf(" --disable-hw-vlan-filter: disable hardware vlan filter.\n");
+ printf(" --disable-hw-vlan-strip: disable hardware vlan strip.\n");
+ printf(" --disable-hw-vlan-extend: disable hardware vlan extend.\n");
printf(" --enable-drop-en: enable per queue packet drop.\n");
printf(" --disable-rss: disable rss.\n");
printf(" --port-topology=N: set port topology (N: paired (default) or "
@@ -528,6 +531,9 @@ launch_args_parse(int argc, char** argv)
{ "crc-strip", 0, 0, 0 },
{ "enable-rx-cksum", 0, 0, 0 },
{ "disable-hw-vlan", 0, 0, 0 },
+ { "disable-hw-vlan-filter", 0, 0, 0 },
+ { "disable-hw-vlan-strip", 0, 0, 0 },
+ { "disable-hw-vlan-extend", 0, 0, 0 },
{ "enable-drop-en", 0, 0, 0 },
{ "disable-rss", 0, 0, 0 },
{ "port-topology", 1, 0, 0 },
@@ -778,6 +784,18 @@ launch_args_parse(int argc, char** argv)
rx_mode.hw_vlan_extend = 0;
}
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-filter"))
+ rx_mode.hw_vlan_filter = 0;
+
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-strip"))
+ rx_mode.hw_vlan_strip = 0;
+
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-extend"))
+ rx_mode.hw_vlan_extend = 0;
+
if (!strcmp(lgopts[opt_idx].name, "enable-drop-en"))
rx_drop_en = 1;
--
1.8.4.2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH v3 2/2] doc: Update for new HW vlan command
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd Ouyang Changchun
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 1/2] testpmd: HW vlan command Ouyang Changchun
@ 2015-03-06 8:10 ` Ouyang Changchun
2015-03-06 8:25 ` Qiu, Michael
2015-03-08 17:52 ` Butler, Siobhan A
2015-03-09 11:23 ` [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd Thomas Monjalon
2 siblings, 2 replies; 16+ messages in thread
From: Ouyang Changchun @ 2015-03-06 8:10 UTC (permalink / raw)
To: dev
Update the testpmd doc as there are new HW VLAN commands/options.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
---
doc/guides/testpmd_app_ug/run_app.rst | 12 +++++++++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 33 +++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 67f62d2..3898e67 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -262,6 +262,18 @@ They must be separated from the EAL options, shown in the previous section, with
Disable hardware VLAN.
+* --disable-hw-vlan-filter
+
+ Disable hardware VLAN filter.
+
+* --disable-hw-vlan-strip
+
+ Disable hardware VLAN strip.
+
+* --disable-hw-vlan-extend
+
+ Disable hardware VLAN extend.
+
* --enable-drop-en
Enable per-queue packet drop for packets with no descriptors.
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 218835a..b644626 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -896,6 +896,39 @@ Hardware VLAN is on by default.
The off option is equivalent to the --disable-hw-vlan command-line option.
+port config - VLAN filter
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware VLAN filter on or off for all ports:
+
+port config all hw-vlan-filter (on|off)
+
+Hardware VLAN filter is on by default.
+
+The off option is equivalent to the --disable-hw-vlan-filter command-line option.
+
+port config - VLAN strip
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware VLAN strip on or off for all ports:
+
+port config all hw-vlan-strip (on|off)
+
+Hardware VLAN strip is on by default.
+
+The off option is equivalent to the --disable-hw-vlan-strip command-line option.
+
+port config - VLAN extend
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware VLAN extend on or off for all ports:
+
+port config all hw-vlan-extend (on|off)
+
+Hardware VLAN extend is off by default.
+
+The off option is equivalent to the --disable-hw-vlan-extend command-line option.
+
port config - Drop Packets
~~~~~~~~~~~~~~~~~~~~~~~~~~
--
1.8.4.2
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/2] testpmd: HW vlan command
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 1/2] testpmd: HW vlan command Ouyang Changchun
@ 2015-03-06 8:22 ` Qiu, Michael
2015-03-06 8:44 ` Ouyang, Changchun
0 siblings, 1 reply; 16+ messages in thread
From: Qiu, Michael @ 2015-03-06 8:22 UTC (permalink / raw)
To: Ouyang, Changchun, dev
On 3/6/2015 4:11 PM, Ouyang Changchun wrote:
> This patch enables testpmd user can config port hw_vlan with more fine granularity:
> hw vlan filter, hw vlan strip, and hw vlan extend.
>
> Don't remove the original command(hw-vlan) considering that some user still want to use
> only one command to switch on/off all 3 options.
>
> Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> app/test-pmd/cmdline.c | 36 +++++++++++++++++++++++++++++++++---
> app/test-pmd/parameters.c | 18 ++++++++++++++++++
> 2 files changed, 51 insertions(+), 3 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 590e427..99cc307 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -584,7 +584,8 @@ 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|drop-en)"
> + "port config all (crc-strip|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"
> " for ports.\n\n"
> @@ -1327,6 +1328,33 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
> printf("Unknown parameter\n");
> return;
> }
> + } else if (!strcmp(res->name, "hw-vlan-filter")) {
> + if (!strcmp(res->value, "on"))
> + rx_mode.hw_vlan_filter = 1;
> + else if (!strcmp(res->value, "off"))
> + rx_mode.hw_vlan_filter = 0;
> + else {
> + printf("Unknown parameter\n");
> + return;
> + }
> + } else if (!strcmp(res->name, "hw-vlan-strip")) {
> + if (!strcmp(res->value, "on"))
> + rx_mode.hw_vlan_strip = 1;
> + else if (!strcmp(res->value, "off"))
> + rx_mode.hw_vlan_strip = 0;
> + else {
> + printf("Unknown parameter\n");
> + return;
> + }
> + } else if (!strcmp(res->name, "hw-vlan-extend")) {
> + if (!strcmp(res->value, "on"))
> + rx_mode.hw_vlan_extend = 1;
> + else if (!strcmp(res->value, "off"))
> + rx_mode.hw_vlan_extend = 0;
> + else {
> + printf("Unknown parameter\n");
> + return;
> + }
> } else if (!strcmp(res->name, "drop-en")) {
> if (!strcmp(res->value, "on"))
> rx_drop_en = 1;
> @@ -1355,7 +1383,8 @@ 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#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,
> "on#off");
> @@ -1363,7 +1392,8 @@ 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 on|off",
> + .help_str = "port config all crc-strip|rx-cksum|hw-vlan|"
> + "hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off",
> .tokens = {
> (void *)&cmd_config_rx_mode_flag_port,
> (void *)&cmd_config_rx_mode_flag_keyword,
> diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
> index adf3203..04dc129 100644
> --- a/app/test-pmd/parameters.c
> +++ b/app/test-pmd/parameters.c
> @@ -157,6 +157,9 @@ usage(char* progname)
> printf(" --crc-strip: enable CRC stripping by hardware.\n");
> printf(" --enable-rx-cksum: enable rx hardware checksum offload.\n");
> printf(" --disable-hw-vlan: disable hardware vlan.\n");
> + printf(" --disable-hw-vlan-filter: disable hardware vlan filter.\n");
> + printf(" --disable-hw-vlan-strip: disable hardware vlan strip.\n");
> + printf(" --disable-hw-vlan-extend: disable hardware vlan extend.\n");
> printf(" --enable-drop-en: enable per queue packet drop.\n");
> printf(" --disable-rss: disable rss.\n");
> printf(" --port-topology=N: set port topology (N: paired (default) or "
> @@ -528,6 +531,9 @@ launch_args_parse(int argc, char** argv)
> { "crc-strip", 0, 0, 0 },
> { "enable-rx-cksum", 0, 0, 0 },
> { "disable-hw-vlan", 0, 0, 0 },
> + { "disable-hw-vlan-filter", 0, 0, 0 },
> + { "disable-hw-vlan-strip", 0, 0, 0 },
> + { "disable-hw-vlan-extend", 0, 0, 0 },
> { "enable-drop-en", 0, 0, 0 },
Hi, Ouyang
Could you help to make this line the same as others?
Also below line:
{ "no-flush-rx", 0, 0, 0 },
I found that, not all of those lines use "Tab" after first field, lots
of them use white space, if all use "Tab", then will keep the same style.
Thanks,
Michael
> { "disable-rss", 0, 0, 0 },
> { "port-topology", 1, 0, 0 },
> @@ -778,6 +784,18 @@ launch_args_parse(int argc, char** argv)
> rx_mode.hw_vlan_extend = 0;
> }
>
> + if (!strcmp(lgopts[opt_idx].name,
> + "disable-hw-vlan-filter"))
> + rx_mode.hw_vlan_filter = 0;
> +
> + if (!strcmp(lgopts[opt_idx].name,
> + "disable-hw-vlan-strip"))
> + rx_mode.hw_vlan_strip = 0;
> +
> + if (!strcmp(lgopts[opt_idx].name,
> + "disable-hw-vlan-extend"))
> + rx_mode.hw_vlan_extend = 0;
> +
> if (!strcmp(lgopts[opt_idx].name, "enable-drop-en"))
> rx_drop_en = 1;
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/2] doc: Update for new HW vlan command
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 2/2] doc: Update for new " Ouyang Changchun
@ 2015-03-06 8:25 ` Qiu, Michael
2015-03-08 17:52 ` Butler, Siobhan A
1 sibling, 0 replies; 16+ messages in thread
From: Qiu, Michael @ 2015-03-06 8:25 UTC (permalink / raw)
To: Ouyang, Changchun, dev
On 3/6/2015 4:10 PM, Ouyang Changchun wrote:
> Update the testpmd doc as there are new HW VLAN commands/options.
>
> Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
> ---
Acked-by: Michael Qiu <michael.qiu@intel.com>
> doc/guides/testpmd_app_ug/run_app.rst | 12 +++++++++++
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 33 +++++++++++++++++++++++++++++
> 2 files changed, 45 insertions(+)
>
> diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
> index 67f62d2..3898e67 100644
> --- a/doc/guides/testpmd_app_ug/run_app.rst
> +++ b/doc/guides/testpmd_app_ug/run_app.rst
> @@ -262,6 +262,18 @@ They must be separated from the EAL options, shown in the previous section, with
>
> Disable hardware VLAN.
>
> +* --disable-hw-vlan-filter
> +
> + Disable hardware VLAN filter.
> +
> +* --disable-hw-vlan-strip
> +
> + Disable hardware VLAN strip.
> +
> +* --disable-hw-vlan-extend
> +
> + Disable hardware VLAN extend.
> +
> * --enable-drop-en
>
> Enable per-queue packet drop for packets with no descriptors.
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> index 218835a..b644626 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -896,6 +896,39 @@ Hardware VLAN is on by default.
>
> The off option is equivalent to the --disable-hw-vlan command-line option.
>
> +port config - VLAN filter
> +~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Set hardware VLAN filter on or off for all ports:
> +
> +port config all hw-vlan-filter (on|off)
> +
> +Hardware VLAN filter is on by default.
> +
> +The off option is equivalent to the --disable-hw-vlan-filter command-line option.
> +
> +port config - VLAN strip
> +~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Set hardware VLAN strip on or off for all ports:
> +
> +port config all hw-vlan-strip (on|off)
> +
> +Hardware VLAN strip is on by default.
> +
> +The off option is equivalent to the --disable-hw-vlan-strip command-line option.
> +
> +port config - VLAN extend
> +~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Set hardware VLAN extend on or off for all ports:
> +
> +port config all hw-vlan-extend (on|off)
> +
> +Hardware VLAN extend is off by default.
> +
> +The off option is equivalent to the --disable-hw-vlan-extend command-line option.
> +
> port config - Drop Packets
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/2] testpmd: HW vlan command
2015-03-06 8:22 ` Qiu, Michael
@ 2015-03-06 8:44 ` Ouyang, Changchun
0 siblings, 0 replies; 16+ messages in thread
From: Ouyang, Changchun @ 2015-03-06 8:44 UTC (permalink / raw)
To: Qiu, Michael, dev
Hi Michael,
> -----Original Message-----
> From: Qiu, Michael
> Sent: Friday, March 6, 2015 4:23 PM
> To: Ouyang, Changchun; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 1/2] testpmd: HW vlan command
>
> On 3/6/2015 4:11 PM, Ouyang Changchun wrote:
> > This patch enables testpmd user can config port hw_vlan with more fine
> granularity:
> > hw vlan filter, hw vlan strip, and hw vlan extend.
> >
> > Don't remove the original command(hw-vlan) considering that some user
> > still want to use only one command to switch on/off all 3 options.
> >
> > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
> > Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > ---
> > app/test-pmd/cmdline.c | 36
> +++++++++++++++++++++++++++++++++---
> > app/test-pmd/parameters.c | 18 ++++++++++++++++++
> > 2 files changed, 51 insertions(+), 3 deletions(-)
> >
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > 590e427..99cc307 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -584,7 +584,8 @@ 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|drop-
> en)"
> > + "port config all (crc-strip|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"
> > " for ports.\n\n"
> > @@ -1327,6 +1328,33 @@ cmd_config_rx_mode_flag_parsed(void
> *parsed_result,
> > printf("Unknown parameter\n");
> > return;
> > }
> > + } else if (!strcmp(res->name, "hw-vlan-filter")) {
> > + if (!strcmp(res->value, "on"))
> > + rx_mode.hw_vlan_filter = 1;
> > + else if (!strcmp(res->value, "off"))
> > + rx_mode.hw_vlan_filter = 0;
> > + else {
> > + printf("Unknown parameter\n");
> > + return;
> > + }
> > + } else if (!strcmp(res->name, "hw-vlan-strip")) {
> > + if (!strcmp(res->value, "on"))
> > + rx_mode.hw_vlan_strip = 1;
> > + else if (!strcmp(res->value, "off"))
> > + rx_mode.hw_vlan_strip = 0;
> > + else {
> > + printf("Unknown parameter\n");
> > + return;
> > + }
> > + } else if (!strcmp(res->name, "hw-vlan-extend")) {
> > + if (!strcmp(res->value, "on"))
> > + rx_mode.hw_vlan_extend = 1;
> > + else if (!strcmp(res->value, "off"))
> > + rx_mode.hw_vlan_extend = 0;
> > + else {
> > + printf("Unknown parameter\n");
> > + return;
> > + }
> > } else if (!strcmp(res->name, "drop-en")) {
> > if (!strcmp(res->value, "on"))
> > rx_drop_en = 1;
> > @@ -1355,7 +1383,8 @@ 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#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,
> > "on#off");
> > @@ -1363,7 +1392,8 @@ 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 on|off",
> > + .help_str = "port config all crc-strip|rx-cksum|hw-vlan|"
> > + "hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off",
> > .tokens = {
> > (void *)&cmd_config_rx_mode_flag_port,
> > (void *)&cmd_config_rx_mode_flag_keyword,
> > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
> > index adf3203..04dc129 100644
> > --- a/app/test-pmd/parameters.c
> > +++ b/app/test-pmd/parameters.c
> > @@ -157,6 +157,9 @@ usage(char* progname)
> > printf(" --crc-strip: enable CRC stripping by hardware.\n");
> > printf(" --enable-rx-cksum: enable rx hardware checksum
> offload.\n");
> > printf(" --disable-hw-vlan: disable hardware vlan.\n");
> > + printf(" --disable-hw-vlan-filter: disable hardware vlan filter.\n");
> > + printf(" --disable-hw-vlan-strip: disable hardware vlan strip.\n");
> > + printf(" --disable-hw-vlan-extend: disable hardware vlan
> > +extend.\n");
> > printf(" --enable-drop-en: enable per queue packet drop.\n");
> > printf(" --disable-rss: disable rss.\n");
> > printf(" --port-topology=N: set port topology (N: paired (default) or "
> > @@ -528,6 +531,9 @@ launch_args_parse(int argc, char** argv)
> > { "crc-strip", 0, 0, 0 },
> > { "enable-rx-cksum", 0, 0, 0 },
> > { "disable-hw-vlan", 0, 0, 0 },
> > + { "disable-hw-vlan-filter", 0, 0, 0 },
> > + { "disable-hw-vlan-strip", 0, 0, 0 },
> > + { "disable-hw-vlan-extend", 0, 0, 0 },
> > { "enable-drop-en", 0, 0, 0 },
>
> Hi, Ouyang
>
> Could you help to make this line the same as others?
> Also below line:
> { "no-flush-rx", 0, 0, 0 },
>
> I found that, not all of those lines use "Tab" after first field, lots of them use
> white space, if all use "Tab", then will keep the same style.
>
It should be another separate patch to do such kind of code cleanup work, not necessary in this patch,
Actually these 3 lines align very well with codes above and below them.
Thanks
Changchun
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH v3 2/2] doc: Update for new HW vlan command
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 2/2] doc: Update for new " Ouyang Changchun
2015-03-06 8:25 ` Qiu, Michael
@ 2015-03-08 17:52 ` Butler, Siobhan A
1 sibling, 0 replies; 16+ messages in thread
From: Butler, Siobhan A @ 2015-03-08 17:52 UTC (permalink / raw)
To: Ouyang, Changchun, dev
> -----Original Message-----
> From: Ouyang, Changchun
> Sent: Friday, March 6, 2015 8:10 AM
> To: dev@dpdk.org
> Cc: Butler, Siobhan A; De Lara Guarch, Pablo; Cao, Waterman; Ouyang,
> Changchun
> Subject: [PATCH v3 2/2] doc: Update for new HW vlan command
>
> Update the testpmd doc as there are new HW VLAN commands/options.
>
> Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
> ---
> doc/guides/testpmd_app_ug/run_app.rst | 12 +++++++++++
> doc/guides/testpmd_app_ug/testpmd_funcs.rst | 33
> +++++++++++++++++++++++++++++
> 2 files changed, 45 insertions(+)
>
> diff --git a/doc/guides/testpmd_app_ug/run_app.rst
> b/doc/guides/testpmd_app_ug/run_app.rst
> index 67f62d2..3898e67 100644
> --- a/doc/guides/testpmd_app_ug/run_app.rst
> +++ b/doc/guides/testpmd_app_ug/run_app.rst
> @@ -262,6 +262,18 @@ They must be separated from the EAL options,
> shown in the previous section, with
>
> Disable hardware VLAN.
>
> +* --disable-hw-vlan-filter
> +
> + Disable hardware VLAN filter.
> +
> +* --disable-hw-vlan-strip
> +
> + Disable hardware VLAN strip.
> +
> +* --disable-hw-vlan-extend
> +
> + Disable hardware VLAN extend.
> +
> * --enable-drop-en
>
> Enable per-queue packet drop for packets with no descriptors.
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> index 218835a..b644626 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -896,6 +896,39 @@ Hardware VLAN is on by default.
>
> The off option is equivalent to the --disable-hw-vlan command-line option.
>
> +port config - VLAN filter
> +~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Set hardware VLAN filter on or off for all ports:
> +
> +port config all hw-vlan-filter (on|off)
> +
> +Hardware VLAN filter is on by default.
> +
> +The off option is equivalent to the --disable-hw-vlan-filter command-line
> option.
> +
> +port config - VLAN strip
> +~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Set hardware VLAN strip on or off for all ports:
> +
> +port config all hw-vlan-strip (on|off)
> +
> +Hardware VLAN strip is on by default.
> +
> +The off option is equivalent to the --disable-hw-vlan-strip command-line
> option.
> +
> +port config - VLAN extend
> +~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Set hardware VLAN extend on or off for all ports:
> +
> +port config all hw-vlan-extend (on|off)
> +
> +Hardware VLAN extend is off by default.
> +
> +The off option is equivalent to the --disable-hw-vlan-extend command-line
> option.
> +
> port config - Drop Packets
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> --
> 1.8.4.2
Acked-by Siobhan Butler <siobhan.a.butler@intel.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd Ouyang Changchun
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 1/2] testpmd: HW vlan command Ouyang Changchun
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 2/2] doc: Update for new " Ouyang Changchun
@ 2015-03-09 11:23 ` Thomas Monjalon
2 siblings, 0 replies; 16+ messages in thread
From: Thomas Monjalon @ 2015-03-09 11:23 UTC (permalink / raw)
To: Ouyang Changchun; +Cc: dev
> This patch enables testpmd user can config port hw_vlan with more fine granularity:
> hw vlan filter, hw vlan strip, and hw vlan extend;
>
> Update testpmd doc accordingly.
>
> Changchun Ouyang (2):
> testpmd: HW vlan command
> doc: Update for new HW vlan command
It may help in validation of this release.
Applied, thanks
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [dpdk-dev] [PATCH] testpmd: HW vlan command
[not found] <F52918179C57134FAEC9EA62FA2F9625119F96A4@shsmsx102.ccr.corp.intel.com>
@ 2015-02-26 2:31 ` Xu, Qian Q
0 siblings, 0 replies; 16+ messages in thread
From: Xu, Qian Q @ 2015-02-26 2:31 UTC (permalink / raw)
To: dev
Tested-by: Qian Xu <qian.q.xu@intel.com>
- Tested Commit: b67578ccdf45df9fd0f0204578b71acd854ca834
- OS: Fedora20 3.11
- GCC: gcc version 4.8.3 20140624
- CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
- NIC: Intel 82599 Ethernet 10G SFI/SFP+ Network Connection
- Default x86_64-native-linuxapp-gcc configuration
- Total 1 case, 1 passed, 0 failed
- Case: test_perf_virtio_one_vm_dpdk_fwd_vhost-user
Description: in one-copy mode, vhost sample is in vhost user mode, launch one VM with 2 virtio devices and run testpmd in the VM.
Steps:
On host:
1. Start vhost-switch. vm2vm 0 means only one vm without vm to vm communication::
taskset -c 1-3 <dpdk_folder>/examples/vhost/build/vhost-switch -c 0xf -n 4 --huge-dir /mnt/huge --socket-mem 1024,1024 -- -p 1 --mergeable 0 --zero-copy 0 --vm2vm 0
2. Start VM with vhost user as backend::
<qemu-2.2.0_folder>/x86_64-softmmu/qemu-system-x86_64 -name us-vhost-vm1 -cpu host -enable-kvm -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa node,memdev=mem -mem-prealloc -smp 2 -drive file=/home/img/dpdk1-vm1.img -chardev socket,id=char0,path=<dpdk/vhost-net -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1 -chardev socket,id=char1,path=/home/qxu10/dpdk/vhost-net -netdev type=vhost-user,id=mynet2,chardev=char1,vhostforce -device virtio-net-pci,mac=52:54:00:00:00:02,netdev=mynet2 -netdev tap,id=ipvm1,ifname=tap3,script=/etc/qemu-ifup -device rtl8139,netdev=ipvm1,id=net0,mac=00:00:00:00:00:09 -nographic
On guest:
3. ensure the dpdk folder copied to the guest with the same config file and build process as host. Then bind 2 virtio devices to igb_uio and start testpmd, below is the step for reference::
./<dpdk_folder>/tools/dpdk_nic_bind.py --bind igb_uio 00:03.0 00:04.0
./<dpdk_folder>/x86_64-native-linuxapp-gcc/app/test-pmd/testpmd -c f -n 4 -- -i --txqflags 0x0f00 --disable-hw-vlan-filter
$ >set fwd mac
$ >start tx_first
4. After typing start tx_first in testpmd, user can see there would be 2 virtio device with MAC and vlan id registered in vhost-user server, the log would be shown in host's vhost-sample output.
5. Send traffic(30second) to virtio1 and virtio2, and set the packet size from 64 to 1518 as well as the jumbo frame 3000. Check the performance in Mpps. The traffic sent to virtio1 should have the DEST MAC of Virtio1's MAC, Vlan id of Virtio1. The traffic sent to virtio2 should have the DEST MAC of Virtio2's MAC, Vlan id of Virtio2. As to the functionality criteria, The received rate should not be zero. As to the performance criteria, need check it with developer or design doc/PRD.
-----Original Message-----
From: Ouyang, Changchun
Sent: Friday, February 13, 2015 8:04 PM
To: dev@dpdk.org
Cc: Cao, Waterman; Ouyang, Changchun
Subject: [PATCH] testpmd: HW vlan command
This patch enables testpmd user can config port hw_vlan with more fine granularity:
hw vlan filter, hw vlan strip, and hw vlan extend.
Don't remove the original command(hw-vlan) considering that some user still want to use only one command to switch on/off all 3 options.
Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
---
app/test-pmd/cmdline.c | 36 +++++++++++++++++++++++++++++++++---
app/test-pmd/parameters.c | 18 ++++++++++++++++++
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 590e427..99cc307 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -584,7 +584,8 @@ 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|drop-en)"
+ "port config all (crc-strip|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"
" for ports.\n\n"
@@ -1327,6 +1328,33 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
printf("Unknown parameter\n");
return;
}
+ } else if (!strcmp(res->name, "hw-vlan-filter")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_filter = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_filter = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
+ } else if (!strcmp(res->name, "hw-vlan-strip")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_strip = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_strip = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
+ } else if (!strcmp(res->name, "hw-vlan-extend")) {
+ if (!strcmp(res->value, "on"))
+ rx_mode.hw_vlan_extend = 1;
+ else if (!strcmp(res->value, "off"))
+ rx_mode.hw_vlan_extend = 0;
+ else {
+ printf("Unknown parameter\n");
+ return;
+ }
} else if (!strcmp(res->name, "drop-en")) {
if (!strcmp(res->value, "on"))
rx_drop_en = 1;
@@ -1355,7 +1383,8 @@ 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#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,
"on#off");
@@ -1363,7 +1392,8 @@ 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 on|off",
+ .help_str = "port config all crc-strip|rx-cksum|hw-vlan|"
+ "hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off",
.tokens = {
(void *)&cmd_config_rx_mode_flag_port,
(void *)&cmd_config_rx_mode_flag_keyword,
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index adf3203..04dc129 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -157,6 +157,9 @@ usage(char* progname)
printf(" --crc-strip: enable CRC stripping by hardware.\n");
printf(" --enable-rx-cksum: enable rx hardware checksum offload.\n");
printf(" --disable-hw-vlan: disable hardware vlan.\n");
+ printf(" --disable-hw-vlan-filter: disable hardware vlan filter.\n");
+ printf(" --disable-hw-vlan-strip: disable hardware vlan strip.\n");
+ printf(" --disable-hw-vlan-extend: disable hardware vlan extend.\n");
printf(" --enable-drop-en: enable per queue packet drop.\n");
printf(" --disable-rss: disable rss.\n");
printf(" --port-topology=N: set port topology (N: paired (default) or "
@@ -528,6 +531,9 @@ launch_args_parse(int argc, char** argv)
{ "crc-strip", 0, 0, 0 },
{ "enable-rx-cksum", 0, 0, 0 },
{ "disable-hw-vlan", 0, 0, 0 },
+ { "disable-hw-vlan-filter", 0, 0, 0 },
+ { "disable-hw-vlan-strip", 0, 0, 0 },
+ { "disable-hw-vlan-extend", 0, 0, 0 },
{ "enable-drop-en", 0, 0, 0 },
{ "disable-rss", 0, 0, 0 },
{ "port-topology", 1, 0, 0 },
@@ -778,6 +784,18 @@ launch_args_parse(int argc, char** argv)
rx_mode.hw_vlan_extend = 0;
}
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-filter"))
+ rx_mode.hw_vlan_filter = 0;
+
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-strip"))
+ rx_mode.hw_vlan_strip = 0;
+
+ if (!strcmp(lgopts[opt_idx].name,
+ "disable-hw-vlan-extend"))
+ rx_mode.hw_vlan_extend = 0;
+
if (!strcmp(lgopts[opt_idx].name, "enable-drop-en"))
rx_drop_en = 1;
--
1.8.4.2
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2015-03-09 11:50 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13 12:03 [dpdk-dev] [PATCH] testpmd: HW vlan command Ouyang Changchun
2015-03-03 23:52 ` De Lara Guarch, Pablo
2015-03-05 10:48 ` Thomas Monjalon
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 0/2] Ouyang Changchun
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 1/2] testpmd: HW vlan command Ouyang Changchun
2015-03-06 8:00 ` [dpdk-dev] [PATCH v2 2/2] doc: Update for new " Ouyang Changchun
2015-03-06 8:09 ` [dpdk-dev] [PATCH v2 0/2] Ouyang, Changchun
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd Ouyang Changchun
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 1/2] testpmd: HW vlan command Ouyang Changchun
2015-03-06 8:22 ` Qiu, Michael
2015-03-06 8:44 ` Ouyang, Changchun
2015-03-06 8:10 ` [dpdk-dev] [PATCH v3 2/2] doc: Update for new " Ouyang Changchun
2015-03-06 8:25 ` Qiu, Michael
2015-03-08 17:52 ` Butler, Siobhan A
2015-03-09 11:23 ` [dpdk-dev] [PATCH v3 0/2] New HW VLAN command in testpmd Thomas Monjalon
[not found] <F52918179C57134FAEC9EA62FA2F9625119F96A4@shsmsx102.ccr.corp.intel.com>
2015-02-26 2:31 ` [dpdk-dev] [PATCH] testpmd: HW vlan command Xu, Qian Q
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).