DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
@ 2019-07-17  7:45 viveksharma
  2019-07-17 13:49 ` Iremonger, Bernard
  2019-07-19 16:53 ` Ferruh Yigit
  0 siblings, 2 replies; 10+ messages in thread
From: viveksharma @ 2019-07-17  7:45 UTC (permalink / raw)
  To: dev; +Cc: intoviveksharma, Vivek Sharma

From: Vivek Sharma <viveksharma@marvell.com>

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

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
---
 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(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2a92ea1..04d7773 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ab458c8..8024584 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -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)
 {
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 245b610..214f25c 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -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;
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index e3a6f7c..ab9e9fd 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -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,
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index e7db520..e6b48f0 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -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.
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index cb83a3c..996cc3a 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -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
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
  2019-07-17  7:45 [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload viveksharma
@ 2019-07-17 13:49 ` Iremonger, Bernard
  2019-07-19 16:53 ` Ferruh Yigit
  1 sibling, 0 replies; 10+ messages in thread
From: Iremonger, Bernard @ 2019-07-17 13:49 UTC (permalink / raw)
  To: viveksharma, dev; +Cc: intoviveksharma

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of
> viveksharma@marvell.com
> Sent: Wednesday, July 17, 2019 8:45 AM
> To: dev@dpdk.org
> Cc: intoviveksharma@gmail.com; Vivek Sharma
> <viveksharma@marvell.com>
> Subject: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
> 
> From: Vivek Sharma <viveksharma@marvell.com>
> 
> Support QinQ strip RX offload configuration through testpmd command line
> and boot time arguments.
> 
> Signed-off-by: Vivek Sharma <viveksharma@marvell.com>

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
  2019-07-17  7:45 [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload viveksharma
  2019-07-17 13:49 ` Iremonger, Bernard
@ 2019-07-19 16:53 ` Ferruh Yigit
  2019-07-22 12:04   ` Iremonger, Bernard
  1 sibling, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2019-07-19 16:53 UTC (permalink / raw)
  To: viveksharma, dev; +Cc: intoviveksharma

On 7/17/2019 8:45 AM, viveksharma@marvell.com wrote:
> From: Vivek Sharma <viveksharma@marvell.com>
> 
> 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

> 
> Signed-off-by: Vivek Sharma <viveksharma@marvell.com>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
  2019-07-19 16:53 ` Ferruh Yigit
@ 2019-07-22 12:04   ` Iremonger, Bernard
  2019-07-22 14:26     ` Ferruh Yigit
  0 siblings, 1 reply; 10+ messages in thread
From: Iremonger, Bernard @ 2019-07-22 12:04 UTC (permalink / raw)
  To: Yigit, Ferruh, viveksharma, dev; +Cc: intoviveksharma

Hi Ferruh,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit
> Sent: Friday, July 19, 2019 5:53 PM
> To: viveksharma@marvell.com; dev@dpdk.org
> Cc: intoviveksharma@gmail.com
> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
> 
> On 7/17/2019 8:45 AM, viveksharma@marvell.com wrote:
> > From: Vivek Sharma <viveksharma@marvell.com>
> >
> > 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.

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

 
> 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.


> 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
> 
> >
> > Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
> 

Regards,

Bernard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
  2019-07-22 12:04   ` Iremonger, Bernard
@ 2019-07-22 14:26     ` Ferruh Yigit
  2019-07-22 14:55       ` Iremonger, Bernard
  0 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2019-07-22 14:26 UTC (permalink / raw)
  To: Iremonger, Bernard, viveksharma, dev; +Cc: intoviveksharma

On 7/22/2019 1:04 PM, Iremonger, Bernard wrote:
> Hi Ferruh,
> 
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit
>> Sent: Friday, July 19, 2019 5:53 PM
>> To: viveksharma@marvell.com; dev@dpdk.org
>> Cc: intoviveksharma@gmail.com
>> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
>>
>> On 7/17/2019 8:45 AM, viveksharma@marvell.com wrote:
>>> From: Vivek Sharma <viveksharma@marvell.com>
>>>
>>> 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.
> 
> 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.

> 
>  
>> 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.

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

> 
> 
>> 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
>>
>>>
>>> Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
>>
> 
> Regards,
> 
> Bernard
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
  2019-07-22 14:26     ` Ferruh Yigit
@ 2019-07-22 14:55       ` Iremonger, Bernard
  2019-07-22 15:40         ` Ferruh Yigit
  0 siblings, 1 reply; 10+ messages in thread
From: Iremonger, Bernard @ 2019-07-22 14:55 UTC (permalink / raw)
  To: Yigit, Ferruh, viveksharma, dev; +Cc: intoviveksharma

Hi Ferruh,

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Monday, July 22, 2019 3:27 PM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>;
> viveksharma@marvell.com; dev@dpdk.org
> Cc: intoviveksharma@gmail.com
> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
> 
> On 7/22/2019 1:04 PM, Iremonger, Bernard wrote:
> > Hi Ferruh,
> >
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit
> >> Sent: Friday, July 19, 2019 5:53 PM
> >> To: viveksharma@marvell.com; dev@dpdk.org
> >> Cc: intoviveksharma@gmail.com
> >> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip
> >> offload
> >>
> >> On 7/17/2019 8:45 AM, viveksharma@marvell.com wrote:
> >>> From: Vivek Sharma <viveksharma@marvell.com>
> >>>
> >>> 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.
> >
> > 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.

> >> 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.
> 
> 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.

> >> 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
> >>
> >>>
> >>> Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
> >>
> >
> > 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
  2019-07-22 14:55       ` Iremonger, Bernard
@ 2019-07-22 15:40         ` Ferruh Yigit
  2019-07-22 17:03           ` Iremonger, Bernard
  0 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2019-07-22 15:40 UTC (permalink / raw)
  To: Iremonger, Bernard, viveksharma, dev; +Cc: intoviveksharma

On 7/22/2019 3:55 PM, Iremonger, Bernard wrote:
> Hi Ferruh,
> 
>> -----Original Message-----
>> From: Yigit, Ferruh
>> Sent: Monday, July 22, 2019 3:27 PM
>> To: Iremonger, Bernard <bernard.iremonger@intel.com>;
>> viveksharma@marvell.com; dev@dpdk.org
>> Cc: intoviveksharma@gmail.com
>> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
>>
>> On 7/22/2019 1:04 PM, Iremonger, Bernard wrote:
>>> Hi Ferruh,
>>>
>>>> -----Original Message-----
>>>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit
>>>> Sent: Friday, July 19, 2019 5:53 PM
>>>> To: viveksharma@marvell.com; dev@dpdk.org
>>>> Cc: intoviveksharma@gmail.com
>>>> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip
>>>> offload
>>>>
>>>> On 7/17/2019 8:45 AM, viveksharma@marvell.com wrote:
>>>>> From: Vivek Sharma <viveksharma@marvell.com>
>>>>>
>>>>> 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.
>>>
>>> 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.

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.

> 
>>>> 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.
>>
>> 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.

> 
>>>> 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
>>>>
>>>>>
>>>>> Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
>>>>
>>>
>>> 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.

> 
> A separate patch set should be submitted for the new style setting offloads commands.
> 
> Regards,
> 
> Bernard
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
  2019-07-22 15:40         ` Ferruh Yigit
@ 2019-07-22 17:03           ` Iremonger, Bernard
  2019-07-22 17:16             ` Ferruh Yigit
  0 siblings, 1 reply; 10+ messages in thread
From: Iremonger, Bernard @ 2019-07-22 17:03 UTC (permalink / raw)
  To: Yigit, Ferruh, viveksharma, dev; +Cc: intoviveksharma

Hi Ferruh,

<snip>

> >>>> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip
> >>>> offload
> >>>>
> >>>> On 7/17/2019 8:45 AM, viveksharma@marvell.com wrote:
> >>>>> From: Vivek Sharma <viveksharma@marvell.com>
> >>>>>
> >>>>> 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.
> >>>
> >>> 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.
> 
> 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.

> >>>> 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.
> >>
> >> 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.

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.

> >>>> 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
> >>>>
> >>>>>
> >>>>> Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
> >>>>
> >>>
> >>> 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.

Testpmd is widely used so removing commands without notice will  probably not go down too well with the community.
 
> 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.

> > A separate patch set should be submitted for the new style setting offloads
> commands.
> >
> > Regards,
> >
> > Bernard
> >

Regards,

Bernard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
  2019-07-22 17:03           ` Iremonger, Bernard
@ 2019-07-22 17:16             ` Ferruh Yigit
  2019-07-23  9:07               ` Iremonger, Bernard
  0 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2019-07-22 17:16 UTC (permalink / raw)
  To: Iremonger, Bernard, viveksharma, dev; +Cc: intoviveksharma

On 7/22/2019 6:03 PM, Iremonger, Bernard wrote:
> Hi Ferruh,
> 
> <snip>
> 
>>>>>> Subject: Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip
>>>>>> offload
>>>>>>
>>>>>> On 7/17/2019 8:45 AM, viveksharma@marvell.com wrote:
>>>>>>> From: Vivek Sharma <viveksharma@marvell.com>
>>>>>>>
>>>>>>> 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.
>>>>>
>>>>> 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.
>>
>> 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.
> 
>>>>>> 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.
>>>>
>>>> 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.
> 
> 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.
> 
>>>>>> 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
>>>>>>
>>>>>>>
>>>>>>> Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
>>>>>>
>>>>>
>>>>> 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.
> 
> 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.

>  
>> 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.
> 
>>> A separate patch set should be submitted for the new style setting offloads
>> commands.
>>>
>>> Regards,
>>>
>>> Bernard
>>>
> 
> Regards,
> 
> Bernard
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload
  2019-07-22 17:16             ` Ferruh Yigit
@ 2019-07-23  9:07               ` Iremonger, Bernard
  0 siblings, 0 replies; 10+ messages in thread
From: Iremonger, Bernard @ 2019-07-23  9:07 UTC (permalink / raw)
  To: Yigit, Ferruh, viveksharma, dev; +Cc: intoviveksharma

Hi Ferruh,

<snip>

> >> 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.

<snip>

More opinions are probably needed on removing testpmd commands.

Regards,

Bernard

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-07-23  9:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17  7:45 [dpdk-dev] [PATCH] app/testpmd: support QinQ strip offload viveksharma
2019-07-17 13:49 ` Iremonger, Bernard
2019-07-19 16:53 ` Ferruh Yigit
2019-07-22 12:04   ` Iremonger, Bernard
2019-07-22 14:26     ` Ferruh Yigit
2019-07-22 14:55       ` Iremonger, Bernard
2019-07-22 15:40         ` Ferruh Yigit
2019-07-22 17:03           ` Iremonger, Bernard
2019-07-22 17:16             ` Ferruh Yigit
2019-07-23  9:07               ` Iremonger, Bernard

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).