Skip to contentSkip to conversation

app/testpmd: support QinQ strip offload

PATCH In review [email protected] 3 participants 10 messages Jul 17, 2019 – Jul 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/testpmd: support QinQ strip offload

From: Vivek Sharma <[email protected]>

Support QinQ strip RX offload configuration through testpmd command line and boot time arguments.

---
 app/test-pmd/cmdline.c                      | 24 ++++++++++++++-----
 app/test-pmd/config.c                       | 36 +++++++++++++++++++++++++++--
 app/test-pmd/parameters.c                   |  6 +++++
 app/test-pmd/testpmd.h                      |  1 +
 doc/guides/testpmd_app_ug/run_app.rst       |  4 ++++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 14 ++++++++++-
 6 files changed, 76 insertions(+), 9 deletions(-)
app/test-pmd/cmdline.c +18 -6
index 2a92ea1..04d7773 100644
@@ -802,7 +802,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"    Set the max packet length.\n\n"
 
 			"port config all (crc-strip|scatter|rx-cksum|rx-timestamp|hw-vlan|hw-vlan-filter|"
-			"hw-vlan-strip|hw-vlan-extend|drop-en)"
+			"hw-vlan-strip|hw-vlan-extend|hw-qinq-strip|drop-en)"
 			" (on|off)\n"
 			"    Set crc-strip/scatter/rx-checksum/hardware-vlan/drop_en"
 			" for ports.\n\n"
@@ -2133,6 +2133,15 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
 				printf("Unknown parameter\n");
 				return;
 			}
+		} else if (!strcmp(res->name, "hw-qinq-strip")) {
+			if (!strcmp(res->value, "on"))
+				rx_offloads |= DEV_RX_OFFLOAD_QINQ_STRIP;
+			else if (!strcmp(res->value, "off"))
+				rx_offloads &= ~DEV_RX_OFFLOAD_QINQ_STRIP;
+			else {
+				printf("Unknown parameter\n");
+				return;
+			}
 		} else if (!strcmp(res->name, "drop-en")) {
 			if (!strcmp(res->value, "on"))
 				rx_drop_en = 1;
@@ -2164,7 +2173,8 @@ cmdline_parse_token_string_t cmd_config_rx_mode_flag_all =
 cmdline_parse_token_string_t cmd_config_rx_mode_flag_name =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, name,
 					"crc-strip#scatter#rx-cksum#rx-timestamp#hw-vlan#"
-					"hw-vlan-filter#hw-vlan-strip#hw-vlan-extend");
+					"hw-vlan-filter#hw-vlan-strip#hw-vlan-extend#"
+					"hw-qinq-strip");
 cmdline_parse_token_string_t cmd_config_rx_mode_flag_value =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_rx_mode_flag, value,
 							"on#off");
@@ -2173,7 +2183,7 @@ 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|scatter|rx-cksum|rx-timestamp|hw-vlan|"
-		"hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off",
+		"hw-vlan-filter|hw-vlan-strip|hw-vlan-extend|hw-qinq-strip on|off",
 	.tokens = {
 		(void *)&cmd_config_rx_mode_flag_port,
 		(void *)&cmd_config_rx_mode_flag_keyword,
@@ -3926,6 +3936,8 @@ cmd_vlan_offload_parsed(void *parsed_result,
 	}
 	else if (!strcmp(res->what, "filter"))
 		rx_vlan_filter_set(port_id, on);
+	else if (!strcmp(res->what, "qinq"))
+		rx_vlan_qinq_strip_set(port_id, on);
 	else
 		vlan_extend_set(port_id, on);
 
@@ -3940,7 +3952,7 @@ cmdline_parse_token_string_t cmd_vlan_offload_set =
 				 set, "set");
 cmdline_parse_token_string_t cmd_vlan_offload_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_vlan_offload_result,
-				 what, "strip#filter#qinq#stripq");
+				 what, "strip#filter#extend#qinq#stripq");
 cmdline_parse_token_string_t cmd_vlan_offload_on =
 	TOKEN_STRING_INITIALIZER(struct cmd_vlan_offload_result,
 			      on, "on#off");
@@ -3951,9 +3963,9 @@ cmdline_parse_token_string_t cmd_vlan_offload_portid =
 cmdline_parse_inst_t cmd_vlan_offload = {
 	.f = cmd_vlan_offload_parsed,
 	.data = NULL,
-	.help_str = "vlan set strip|filter|qinq|stripq on|off "
+	.help_str = "vlan set strip|filter|extend|qinq|stripq on|off "
 		"<port_id[,queue_id]>: "
-		"Filter/Strip for rx side qinq(extended) for both rx/tx sides",
+		"Filter/Strip/QinQ strip for rx side extend for both rx/tx sides",
 	.tokens = {
 		(void *)&cmd_vlan_offload_vlan,
 		(void *)&cmd_vlan_offload_set,
app/test-pmd/config.c +34 -2
index ab458c8..8024584 100644
@@ -458,9 +458,14 @@ port_infos_display(portid_t port_id)
 			printf("  filter off \n");
 
 		if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)
-			printf("  qinq(extend) on \n");
+			printf("  extend on\n");
 		else
-			printf("  qinq(extend) off \n");
+			printf("  extend off\n");
+
+		if (vlan_offload & ETH_QINQ_STRIP_OFFLOAD)
+			printf("  qinq strip on\n");
+		else
+			printf("  qinq strip off\n");
 	}
 
 	if (dev_info.hash_key_size > 0)
@@ -2912,6 +2917,33 @@ rx_vlan_filter_set(portid_t port_id, int on)
 	ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads;
 }
 
+void
+rx_vlan_qinq_strip_set(portid_t port_id, int on)
+{
+	int diag;
+	int vlan_offload;
+	uint64_t port_rx_offloads = ports[port_id].dev_conf.rxmode.offloads;
+
+	if (port_id_is_invalid(port_id, ENABLED_WARN))
+		return;
+
+	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
+
+	if (on) {
+		vlan_offload |= ETH_QINQ_STRIP_OFFLOAD;
+		port_rx_offloads |= DEV_RX_OFFLOAD_QINQ_STRIP;
+	} else {
+		vlan_offload &= ~ETH_QINQ_STRIP_OFFLOAD;
+		port_rx_offloads &= ~DEV_RX_OFFLOAD_QINQ_STRIP;
+	}
+
+	diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload);
+	if (diag < 0)
+		printf("%s(port_pi=%d, on=%d) failed "
+	       "diag=%d\n", __func__, port_id, on, diag);
+	ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads;
+}
+
 int
 rx_vft_set(portid_t port_id, uint16_t vlan_id, int on)
 {
app/test-pmd/parameters.c +6 -0
index 245b610..214f25c 100644
@@ -139,6 +139,7 @@ usage(char* progname)
 	printf("  --enable-hw-vlan-filter: enable hardware vlan filter.\n");
 	printf("  --enable-hw-vlan-strip: enable hardware vlan strip.\n");
 	printf("  --enable-hw-vlan-extend: enable hardware vlan extend.\n");
+	printf("  --enable-hw-qinq-strip: enable hardware qinq strip.\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 "
@@ -611,6 +612,7 @@ launch_args_parse(int argc, char** argv)
 		{ "enable-hw-vlan-filter",      0, 0, 0 },
 		{ "enable-hw-vlan-strip",       0, 0, 0 },
 		{ "enable-hw-vlan-extend",      0, 0, 0 },
+		{ "enable-hw-qinq-strip",       0, 0, 0 },
 		{ "enable-drop-en",            0, 0, 0 },
 		{ "disable-rss",                0, 0, 0 },
 		{ "port-topology",              1, 0, 0 },
@@ -1001,6 +1003,10 @@ launch_args_parse(int argc, char** argv)
 					"enable-hw-vlan-extend"))
 				rx_offloads |= DEV_RX_OFFLOAD_VLAN_EXTEND;
 
+			if (!strcmp(lgopts[opt_idx].name,
+					"enable-hw-qinq-strip"))
+				rx_offloads |= DEV_RX_OFFLOAD_QINQ_STRIP;
+
 			if (!strcmp(lgopts[opt_idx].name, "enable-drop-en"))
 				rx_drop_en = 1;
 
app/test-pmd/testpmd.h +1 -0
index e3a6f7c..ab9e9fd 100644
@@ -748,6 +748,7 @@ void rx_vlan_strip_set_on_queue(portid_t port_id, uint16_t queue_id, int on);
 
 void rx_vlan_filter_set(portid_t port_id, int on);
 void rx_vlan_all_filter_set(portid_t port_id, int on);
+void rx_vlan_qinq_strip_set(portid_t port_id, int on);
 int rx_vft_set(portid_t port_id, uint16_t vlan_id, int on);
 void vlan_extend_set(portid_t port_id, int on);
 void vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type,
doc/guides/testpmd_app_ug/run_app.rst +4 -0
index e7db520..e6b48f0 100644
@@ -198,6 +198,10 @@ The command line options are:
 
     Enable hardware VLAN extend.
 
+*   ``--enable-hw-qinq-strip``
+
+    Enable hardware QINQ strip.
+
 *   ``--enable-drop-en``
 
     Enable per-queue packet drop for packets with no descriptors.
doc/guides/testpmd_app_ug/testpmd_funcs.rst +13 -1
index cb83a3c..996cc3a 100644
@@ -200,7 +200,8 @@ For example:
    VLAN offload:
        strip on
        filter on
-       qinq(extend) off
+       extend off
+       qinq off
    Redirection table size: 512
    Supported flow types:
      ipv4-frag
@@ -2129,6 +2130,17 @@ Hardware VLAN extend is off by default.
 
 The ``on`` option is equivalent to the ``--enable-hw-vlan-extend`` command-line option.
 
+port config - QINQ strip
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Set hardware QINQ strip on or off for all ports::
+
+   testpmd> port config all hw-qinq-strip (on|off)
+
+Hardware QINQ strip is off by default.
+
+The ``on`` option is equivalent to the ``--enable-hw-qinq-strip`` command-line option.
+
 port config - Drop Packets
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of [email protected]
Sent: Wednesday, July 17, 2019 8:45 AM
To: [email protected]
Cc: [email protected]; Vivek Sharma <[email protected]>
Subject: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload

Quoted 6 lines

From: Vivek Sharma <[email protected]>

Support QinQ strip RX offload configuration through testpmd command line and boot time arguments.

#2 lore raw
In reply to [email protected]
Quoted 4 lines · On 7/17/2019 8:45 AM, [email protected] wrote:

From: Vivek Sharma <[email protected]>

Support QinQ strip RX offload configuration through testpmd command line and boot time arguments.

For the testpmd command part, unfortunately there are two set of commands for same purpose, the new ones are (lets both port and queue level):
"port config <port_id> rx_offload ..."
"port (port_id) rxq (queue_id) rx_offload ..."
"port config (port_id) tx_offload ..."
"port (port_id) txq (queue_id) tx_offload ..."

These are better implementation comparing the old one:
"port config all ..."

Would you mind sending a patch to remove "port config all ..." variant of setting offloads?
And you can make your changes to the new commands above.

For the application argument, ``--enable-hw-vlan-extend``, instead of adding a parameter of each offload argument, (and event it is not clear if it is only for Rx or Tx), have a "--rx-offloads" argument and feed the list via this, like:
"--rx-ofloads=disable-crc-strip,enable-rx-timestamp"

And lastly for the "vlan set ..." update, I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing it and making it call 'rx_vlan_qinq_strip_set()', I think this is OK, but can you please update the 'cmd_help_long_parsed()' accordingly?
And in original 'cmd_help_long_parsed()' for 'vlan set ...", it doesn't need to have separate lines for "strip, filter & qinq", can you please merge them, and later the 'extend' one?
Than change needs to be documented on "testpmd_funcs.rst"

And as a last thing, can you please send this as multiple patches:
1) Command line change for setting qinq offload
2) Application argument change
3) "vlan set " related changes

Quoted 2 lines
#3 lore raw

Hi Ferruh,

Quoted 21 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ferruh Yigit
Sent: Friday, July 19, 2019 5:53 PM
To: [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload

Quoted 4 lines · On 7/17/2019 8:45 AM, [email protected] wrote:

From: Vivek Sharma <[email protected]>

Support QinQ strip RX offload configuration through testpmd command line and boot time arguments.

For the testpmd command part, unfortunately there are two set of commands for same purpose, the new ones are (lets both port and queue level):
"port config <port_id> rx_offload ..."
"port (port_id) rxq (queue_id) rx_offload ..."
"port config (port_id) tx_offload ..."
"port (port_id) txq (queue_id) tx_offload ..."

Quoted 6 lines

These are better implementation comparing the old one:
"port config all ..."

Would you mind sending a patch to remove "port config all ..." variant of setting offloads?
And you can make your changes to the new commands above.

Is it ok to remove "port config all ..." commands as they may be in use by the community?

Quoted 11 lines

For the application argument, ``--enable-hw-vlan-extend``, instead of adding a parameter of each offload argument, (and event it is not clear if it is only for Rx or Tx), have a "--rx-offloads" argument and feed the list via this, like:
"--rx-ofloads=disable-crc-strip,enable-rx-timestamp"

And lastly for the "vlan set ..." update, I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing it and making it call 'rx_vlan_qinq_strip_set()', I think this is OK, but can you please update the 'cmd_help_long_parsed()' accordingly?

'vlan_extend_set()' and 'rx_vlan_qinq_strip_set()' are different commands. vlan_extend_set() is for adding the second vlan and rx_vlan_qinq_strip_set() is for removing the second vlan.

Quoted 6 lines

And in original 'cmd_help_long_parsed()' for 'vlan set ...", it doesn't need to have separate lines for "strip, filter & qinq", can you please merge them, and later the 'extend' one?
Than change needs to be documented on "testpmd_funcs.rst"

Quoted 8 lines

And as a last thing, can you please send this as multiple patches:
1) Command line change for setting qinq offload
2) Application argument change
3) "vlan set " related changes

Quoted 2 lines

Regards,

Bernard

#4 lore raw
Quoted 23 lines · Bernard

Hi Ferruh,

Quoted 21 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ferruh Yigit
Sent: Friday, July 19, 2019 5:53 PM
To: [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload

Quoted 4 lines · On 7/17/2019 8:45 AM, [email protected] wrote:

From: Vivek Sharma <[email protected]>

Support QinQ strip RX offload configuration through testpmd command line and boot time arguments.

For the testpmd command part, unfortunately there are two set of commands for same purpose, the new ones are (lets both port and queue level):
"port config <port_id> rx_offload ..."
"port (port_id) rxq (queue_id) rx_offload ..."
"port config (port_id) tx_offload ..."
"port (port_id) txq (queue_id) tx_offload ..."

Quoted 8 lines
Quoted 6 lines

These are better implementation comparing the old one:
"port config all ..."

Would you mind sending a patch to remove "port config all ..." variant of setting offloads?
And you can make your changes to the new commands above.

Is it ok to remove "port config all ..." commands as they may be in use by the community?

Since there is a command that replaces the removed functionality I think it is OK.

Also I am not sure what level of backward compatibility we should provide for testpmd commands.

Quoted 9 lines
Quoted 9 lines

For the application argument, ``--enable-hw-vlan-extend``, instead of adding a parameter of each offload argument, (and event it is not clear if it is only for Rx or Tx), have a "--rx-offloads" argument and feed the list via this, like:
"--rx-ofloads=disable-crc-strip,enable-rx-timestamp"

Quoted 7 lines
Quoted 4 lines

And lastly for the "vlan set ..." update, I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing it and making it call 'rx_vlan_qinq_strip_set()', I think this is OK, but can you please update the 'cmd_help_long_parsed()' accordingly?

'vlan_extend_set()' and 'rx_vlan_qinq_strip_set()' are different commands. vlan_extend_set() is for adding the second vlan and rx_vlan_qinq_strip_set() is for removing the second vlan.

yes they are different, I think nobody said they are same. What is the concern here, can you please detail more?

Quoted 21 lines
Quoted 8 lines

And in original 'cmd_help_long_parsed()' for 'vlan set ...", it doesn't need to have separate lines for "strip, filter & qinq", can you please merge them, and later the 'extend' one?
Than change needs to be documented on "testpmd_funcs.rst"

Quoted 8 lines

And as a last thing, can you please send this as multiple patches:
1) Command line change for setting qinq offload
2) Application argument change
3) "vlan set " related changes

Quoted 2 lines

Regards,

Bernard

#5 lore raw

Hi Ferruh,

Quoted 41 lines

-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, July 22, 2019 3:27 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload

Quoted 18 lines · Bernard

Hi Ferruh,

Quoted 16 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ferruh Yigit
Sent: Friday, July 19, 2019 5:53 PM
To: [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload

Quoted 4 lines · On 7/17/2019 8:45 AM, [email protected] wrote:

From: Vivek Sharma <[email protected]>

Support QinQ strip RX offload configuration through testpmd command line and boot time arguments.

For the testpmd command part, unfortunately there are two set of commands for same purpose, the new ones are (lets both port and

queue

Quoted 13 lines
Quoted 12 lines

level):
"port config <port_id> rx_offload ..."
"port (port_id) rxq (queue_id) rx_offload ..."
"port config (port_id) tx_offload ..."
"port (port_id) txq (queue_id) tx_offload ..."

These are better implementation comparing the old one:
"port config all ..."

Would you mind sending a patch to remove "port config all ..." variant of setting offloads?
And you can make your changes to the new commands above.

Quoted 8 lines
Quoted 1 line

Is it ok to remove "port config all ..." commands as they may be in use by

the community?

Since there is a command that replaces the removed functionality I think it is OK.

Also I am not sure what level of backward compatibility we should provide for testpmd commands.

It might be better to leave "port config all ..." commands as they are for now and provide a separate patchset for the new style port setting offloads commands.

If they are to be removed there should at least be something to announce this in the release notes. There is a deprecation process which is used for the rest of the code, why not follow that process.

Quoted 13 lines
Quoted 3 lines
Quoted 3 lines

For the application argument, ``--enable-hw-vlan-extend``, instead of adding a parameter of each offload argument, (and event it is not clear if it is only for Rx or Tx), have a "--rx-offloads" argument and feed

the list via this, like:

Quoted 9 lines
Quoted 8 lines

"--rx-ofloads=disable-crc-strip,enable-rx-timestamp"

And lastly for the "vlan set ..." update, I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing it and making it call 'rx_vlan_qinq_strip_set()', I think this is OK, but can you please update the 'cmd_help_long_parsed()' accordingly?

Quoted 7 lines
Quoted 1 line

'vlan_extend_set()' and 'rx_vlan_qinq_strip_set()' are different

commands.

Quoted 1 line

vlan_extend_set() is for adding the second vlan and

rx_vlan_qinq_strip_set() is for removing the second vlan.

yes they are different, I think nobody said they are same. What is the concern here, can you please detail more?

In the previous paragraph, you mentioned that
"I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing
it and making it call 'rx_vlan_qinq_strip_set()' "

vlan_extend_set() is not being changed, rx_vlan_qinq_strip_set() is being added.

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines

And in original 'cmd_help_long_parsed()' for 'vlan set ...", it doesn't need to have separate lines for "strip, filter & qinq", can you please merge them, and later the 'extend' one?
Than change needs to be documented on "testpmd_funcs.rst"

And as a last thing, can you please send this as multiple patches:
1) Command line change for setting qinq offload
2) Application argument change
3) "vlan set " related changes

Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 1 line

Regards,

Bernard

In my opinion this patch was fine for the "port config all ..." style commands.

A separate patch set should be submitted for the new style setting offloads commands.

Regards,

Bernard

#6 lore raw
Quoted 49 lines · Bernard

Hi Ferruh,

Quoted 47 lines

-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, July 22, 2019 3:27 PM
To: Iremonger, Bernard <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload

Quoted 18 lines · Bernard

Hi Ferruh,

Quoted 16 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ferruh Yigit
Sent: Friday, July 19, 2019 5:53 PM
To: [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload

Quoted 4 lines · On 7/17/2019 8:45 AM, [email protected] wrote:

From: Vivek Sharma <[email protected]>

Support QinQ strip RX offload configuration through testpmd command line and boot time arguments.

For the testpmd command part, unfortunately there are two set of commands for same purpose, the new ones are (lets both port and

queue

Quoted 6 lines
Quoted 6 lines

level):
"port config <port_id> rx_offload ..."
"port (port_id) rxq (queue_id) rx_offload ..."
"port config (port_id) tx_offload ..."
"port (port_id) txq (queue_id) tx_offload ..."

Quoted 8 lines
Quoted 6 lines

These are better implementation comparing the old one:
"port config all ..."

Would you mind sending a patch to remove "port config all ..." variant of setting offloads?
And you can make your changes to the new commands above.

Is it ok to remove "port config all ..." commands as they may be in use by

the community?

Since there is a command that replaces the removed functionality I think it is OK.

Quoted 6 lines
Quoted 2 lines

Also I am not sure what level of backward compatibility we should provide for testpmd commands.

It might be better to leave "port config all ..." commands as they are for now and provide a separate patchset for the new style port setting offloads commands.

If they are to be removed there should at least be something to announce this in the release notes. There is a deprecation process which is used for the rest of the code, why not follow that process.

Deprecation process is for ABI/API changes.

I can see testpmd commands also a kind of user interface, but this is a test application at the end, deprecation process can be overkill here. Although +1 to be cautious on command consistency and keep some level of stability on them.

Quoted 19 lines
Quoted 19 lines
Quoted 4 lines
Quoted 4 lines

For the application argument, ``--enable-hw-vlan-extend``, instead of adding a parameter of each offload argument, (and event it is not clear if it is only for Rx or Tx), have a "--rx-offloads" argument and feed

the list via this, like:

Quoted 10 lines
Quoted 8 lines

"--rx-ofloads=disable-crc-strip,enable-rx-timestamp"

And lastly for the "vlan set ..." update, I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing it and making it call 'rx_vlan_qinq_strip_set()', I think this is OK, but can you please update the 'cmd_help_long_parsed()' accordingly?

'vlan_extend_set()' and 'rx_vlan_qinq_strip_set()' are different

commands.

Quoted 1 line

vlan_extend_set() is for adding the second vlan and

rx_vlan_qinq_strip_set() is for removing the second vlan.

Quoted 8 lines
Quoted 2 lines

yes they are different, I think nobody said they are same. What is the concern here, can you please detail more?

In the previous paragraph, you mentioned that
"I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing
it and making it call 'rx_vlan_qinq_strip_set()' "

vlan_extend_set() is not being changed, rx_vlan_qinq_strip_set() is being added.

Before this patch,
"vlan set qinq" calls 'vlan_extend_set()'

After patch,
"vlan set qinq" calls 'rx_vlan_qinq_strip_set()'

And again after this patch,
"vlan set extend" added and which calls 'vlan_extend_set()'

so the patch looks like adding "vlan set extend" command, but practically it does fix "vlan set qinq", I said "I think this is OK" and asked for help string & documentation update accordingly.

I hope it is clear now.

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

And in original 'cmd_help_long_parsed()' for 'vlan set ...", it doesn't need to have separate lines for "strip, filter & qinq", can you please merge them, and later the 'extend' one?
Than change needs to be documented on "testpmd_funcs.rst"

And as a last thing, can you please send this as multiple patches:
1) Command line change for setting qinq offload
2) Application argument change
3) "vlan set " related changes

Quoted 1 line
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 1 line

Regards,

Bernard

In my opinion this patch was fine for the "port config all ..." style commands.

Duplication is bad, it is bad to have two different ways to do same thing. I am not sure if Vivek is aware of duplicated functions but explicitly prefers to update old versions.
I suggest lets stop improving these ones and get rid of them asap.

Also as you can see commit log doesn't mention from "vlan set ..." changes at all, that is why I asked for splitting this into 3 patches for 3 separate thing it does.

Quoted 7 lines

A separate patch set should be submitted for the new style setting offloads commands.

Regards,

Bernard

#7 lore raw

Hi Ferruh,

<snip>

Quoted 86 lines
Quoted 29 lines
Quoted 29 lines
Quoted 11 lines
Quoted 11 lines

Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload

Quoted 4 lines · On 7/17/2019 8:45 AM, [email protected] wrote:

From: Vivek Sharma <[email protected]>

Support QinQ strip RX offload configuration through testpmd command line and boot time arguments.

For the testpmd command part, unfortunately there are two set of commands for same purpose, the new ones are (lets both port and

queue

Quoted 9 lines
Quoted 9 lines

level):
"port config <port_id> rx_offload ..."
"port (port_id) rxq (queue_id) rx_offload ..."
"port config (port_id) tx_offload ..."
"port (port_id) txq (queue_id) tx_offload ..."

These are better implementation comparing the old one:
"port config all ..."

Quoted 6 lines
Quoted 3 lines

Would you mind sending a patch to remove "port config all ..." variant of setting offloads?
And you can make your changes to the new commands above.

Is it ok to remove "port config all ..." commands as they may be in use by

the community?

Quoted 7 lines
Quoted 5 lines

Since there is a command that replaces the removed functionality I think it is OK.

Also I am not sure what level of backward compatibility we should provide for testpmd commands.

It might be better to leave "port config all ..." commands as they are for

now and provide a separate patchset for the new style port setting offloads commands.

Quoted 2 lines

If they are to be removed there should at least be something to announce

this in the release notes. There is a deprecation process which is used for the rest of the code, why not follow that process.

Deprecation process is for ABI/API changes.

I can see testpmd commands also a kind of user interface, but this is a test application at the end, deprecation process can be overkill here. Although +1 to be cautious on command consistency and keep some level of stability on them.

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines

For the application argument, ``--enable-hw-vlan-extend``, instead of adding a parameter of each offload argument, (and event it is not clear if it is only for Rx or Tx), have a "--rx-offloads" argument and feed

the list via this, like:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

"--rx-ofloads=disable-crc-strip,enable-rx-timestamp"

And lastly for the "vlan set ..." update, I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing it and making it call 'rx_vlan_qinq_strip_set()', I think this is OK, but can you please update the 'cmd_help_long_parsed()'

accordingly?

Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

'vlan_extend_set()' and 'rx_vlan_qinq_strip_set()' are different

commands.

Quoted 1 line

vlan_extend_set() is for adding the second vlan and

rx_vlan_qinq_strip_set() is for removing the second vlan.

Quoted 8 lines
Quoted 2 lines

yes they are different, I think nobody said they are same. What is the concern here, can you please detail more?

In the previous paragraph, you mentioned that "I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing it and making it call 'rx_vlan_qinq_strip_set()' "

vlan_extend_set() is not being changed, rx_vlan_qinq_strip_set() is being

added.

Before this patch,
"vlan set qinq" calls 'vlan_extend_set()'

After patch,
"vlan set qinq" calls 'rx_vlan_qinq_strip_set()'

Quoted 8 lines

And again after this patch,
"vlan set extend" added and which calls 'vlan_extend_set()'

so the patch looks like adding "vlan set extend" command, but practically it does fix "vlan set qinq", I said "I think this is OK" and asked for help string & documentation update accordingly.

I hope it is clear now.

Yes, I see what you mean now (well spotted).
Previously the "qinq" keyword mapped to extend now it maps to qinq_strip. It would be better to leave the function of the "qinq" keyword as it was add a "qinqstrip" keyword instead of adding the "extend" keyword.

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 6 lines

And in original 'cmd_help_long_parsed()' for 'vlan set ...", it doesn't need to have separate lines for "strip, filter & qinq", can you please merge them, and later the 'extend' one?
Than change needs to be documented on "testpmd_funcs.rst"

Quoted 8 lines

And as a last thing, can you please send this as multiple patches:
1) Command line change for setting qinq offload
2) Application argument change
3) "vlan set " related changes

Quoted 2 lines

Regards,

Bernard

Quoted 7 lines
Quoted 1 line

In my opinion this patch was fine for the "port config all ..." style

commands.

Duplication is bad, it is bad to have two different ways to do same thing. I am not sure if Vivek is aware of duplicated functions but explicitly prefers to update old versions.
I suggest lets stop improving these ones and get rid of them asap.

Testpmd is widely used so removing commands without notice will probably not go down too well with the community.

Quoted 3 lines

Also as you can see commit log doesn't mention from "vlan set ..." changes at all, that is why I asked for splitting this into 3 patches for 3 separate thing it does.

Ok, it should describe the "vlan set ...." changes.

Quoted 7 lines
Quoted 1 line

A separate patch set should be submitted for the new style setting offloads

commands.

Quoted 5 lines

Regards,

Bernard

Regards,

Bernard

#8 lore raw
Quoted 122 lines · Bernard

Hi Ferruh,

<snip>

Quoted 86 lines
Quoted 29 lines
Quoted 29 lines
Quoted 11 lines
Quoted 11 lines

Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload

Quoted 4 lines · On 7/17/2019 8:45 AM, [email protected] wrote:

From: Vivek Sharma <[email protected]>

Support QinQ strip RX offload configuration through testpmd command line and boot time arguments.

For the testpmd command part, unfortunately there are two set of commands for same purpose, the new ones are (lets both port and

queue

Quoted 9 lines
Quoted 9 lines

level):
"port config <port_id> rx_offload ..."
"port (port_id) rxq (queue_id) rx_offload ..."
"port config (port_id) tx_offload ..."
"port (port_id) txq (queue_id) tx_offload ..."

These are better implementation comparing the old one:
"port config all ..."

Quoted 6 lines
Quoted 3 lines

Would you mind sending a patch to remove "port config all ..." variant of setting offloads?
And you can make your changes to the new commands above.

Is it ok to remove "port config all ..." commands as they may be in use by

the community?

Quoted 7 lines
Quoted 5 lines

Since there is a command that replaces the removed functionality I think it is OK.

Also I am not sure what level of backward compatibility we should provide for testpmd commands.

It might be better to leave "port config all ..." commands as they are for

now and provide a separate patchset for the new style port setting offloads commands.

Quoted 2 lines

If they are to be removed there should at least be something to announce

this in the release notes. There is a deprecation process which is used for the rest of the code, why not follow that process.

Deprecation process is for ABI/API changes.

I can see testpmd commands also a kind of user interface, but this is a test application at the end, deprecation process can be overkill here. Although +1 to be cautious on command consistency and keep some level of stability on them.

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines

For the application argument, ``--enable-hw-vlan-extend``, instead of adding a parameter of each offload argument, (and event it is not clear if it is only for Rx or Tx), have a "--rx-offloads" argument and feed

the list via this, like:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

"--rx-ofloads=disable-crc-strip,enable-rx-timestamp"

And lastly for the "vlan set ..." update, I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing it and making it call 'rx_vlan_qinq_strip_set()', I think this is OK, but can you please update the 'cmd_help_long_parsed()'

accordingly?

Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

'vlan_extend_set()' and 'rx_vlan_qinq_strip_set()' are different

commands.

Quoted 1 line

vlan_extend_set() is for adding the second vlan and

rx_vlan_qinq_strip_set() is for removing the second vlan.

Quoted 8 lines
Quoted 2 lines

yes they are different, I think nobody said they are same. What is the concern here, can you please detail more?

In the previous paragraph, you mentioned that "I think "qinq" was already defined but it was calling 'vlan_extend_set()', now you are changing it and making it call 'rx_vlan_qinq_strip_set()' "

vlan_extend_set() is not being changed, rx_vlan_qinq_strip_set() is being

added.

Before this patch,
"vlan set qinq" calls 'vlan_extend_set()'

After patch,
"vlan set qinq" calls 'rx_vlan_qinq_strip_set()'

Quoted 8 lines

And again after this patch,
"vlan set extend" added and which calls 'vlan_extend_set()'

so the patch looks like adding "vlan set extend" command, but practically it does fix "vlan set qinq", I said "I think this is OK" and asked for help string & documentation update accordingly.

I hope it is clear now.

Yes, I see what you mean now (well spotted).
Previously the "qinq" keyword mapped to extend now it maps to qinq_strip. It would be better to leave the function of the "qinq" keyword as it was add a "qinqstrip" keyword instead of adding the "extend" keyword.

Quoted 20 lines
Quoted 20 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines

And in original 'cmd_help_long_parsed()' for 'vlan set ...", it doesn't need to have separate lines for "strip, filter & qinq", can you please merge them, and later the 'extend' one?
Than change needs to be documented on "testpmd_funcs.rst"

And as a last thing, can you please send this as multiple patches:
1) Command line change for setting qinq offload
2) Application argument change
3) "vlan set " related changes

Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 1 line

Regards,

Bernard

In my opinion this patch was fine for the "port config all ..." style

Quoted 8 lines
Quoted 6 lines

commands.

Duplication is bad, it is bad to have two different ways to do same thing. I am not sure if Vivek is aware of duplicated functions but explicitly prefers to update old versions.
I suggest lets stop improving these ones and get rid of them asap.

Testpmd is widely used so removing commands without notice will probably not go down too well with the community.

We can make sure release notes is updated for removed commands and what is replacing them, also can have same thing in the commit log, these can help user.

But I am dubious to follow deprecation process for testpmd commands.

Quoted 19 lines
Quoted 4 lines

Also as you can see commit log doesn't mention from "vlan set ..." changes at all, that is why I asked for splitting this into 3 patches for 3 separate thing it does.

Ok, it should describe the "vlan set ...." changes.

Quoted 7 lines
Quoted 1 line

A separate patch set should be submitted for the new style setting offloads

commands.

Quoted 5 lines

Regards,

Bernard

Regards,

Bernard

#9 lore raw

Hi Ferruh,

<snip>

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

Duplication is bad, it is bad to have two different ways to do same thing. I am not sure if Vivek is aware of duplicated functions but explicitly prefers to update old versions.
I suggest lets stop improving these ones and get rid of them asap.

Quoted 8 lines
Quoted 1 line

Testpmd is widely used so removing commands without notice will

probably not go down too well with the community.

We can make sure release notes is updated for removed commands and what is replacing them, also can have same thing in the commit log, these can help user.

But I am dubious to follow deprecation process for testpmd commands.

<snip>

More opinions are probably needed on removing testpmd commands.

Regards,

Bernard