DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: introduce QinQ offload argument
@ 2019-10-10  4:17 viveksharma
  2019-10-11  2:36 ` [dpdk-dev] [PATCH v2] " viveksharma
  0 siblings, 1 reply; 3+ messages in thread
From: viveksharma @ 2019-10-10  4:17 UTC (permalink / raw)
  To: dev; +Cc: intoviveksharma, ferruh.yigit, Vivek Sharma

From: Vivek Sharma <viveksharma@marvell.com>

Introduce boot time argument for configuring QinQ strip
offload. Fix port info display to distinguish between
qinq strip and extend offloads.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
---
 app/test-pmd/config.c                 | 9 +++++++--
 app/test-pmd/parameters.c             | 6 ++++++
 doc/guides/testpmd_app_ug/run_app.rst | 4 ++++
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 24158e5..85848c3 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -534,9 +534,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)
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 6c78dca..6885eed 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -135,6 +135,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 "
@@ -608,6 +609,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 },
@@ -995,6 +997,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/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index d0d89b3..9723cf5 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.
-- 
2.7.4


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

* [dpdk-dev] [PATCH v2] app/testpmd: introduce QinQ offload argument
  2019-10-10  4:17 [dpdk-dev] [PATCH] app/testpmd: introduce QinQ offload argument viveksharma
@ 2019-10-11  2:36 ` " viveksharma
  2019-10-14 10:43   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: viveksharma @ 2019-10-11  2:36 UTC (permalink / raw)
  To: dev; +Cc: intoviveksharma, ferruh.yigit, Vivek Sharma

From: Vivek Sharma <viveksharma@marvell.com>

Introduce boot time argument for configuring QinQ strip
offload.

Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
---
v2:
* Moved 'port_infos_display' change to another patch.

 app/test-pmd/parameters.c             | 6 ++++++
 doc/guides/testpmd_app_ug/run_app.rst | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 6c78dca..6885eed 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -135,6 +135,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 "
@@ -608,6 +609,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 },
@@ -995,6 +997,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/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index d0d89b3..9723cf5 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.
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH v2] app/testpmd: introduce QinQ offload argument
  2019-10-11  2:36 ` [dpdk-dev] [PATCH v2] " viveksharma
@ 2019-10-14 10:43   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2019-10-14 10:43 UTC (permalink / raw)
  To: viveksharma, dev; +Cc: intoviveksharma

On 10/11/2019 3:36 AM, viveksharma@marvell.com wrote:
> From: Vivek Sharma <viveksharma@marvell.com>
> 
> Introduce boot time argument for configuring QinQ strip
> offload.
> 
> Signed-off-by: Vivek Sharma <viveksharma@marvell.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10  4:17 [dpdk-dev] [PATCH] app/testpmd: introduce QinQ offload argument viveksharma
2019-10-11  2:36 ` [dpdk-dev] [PATCH v2] " viveksharma
2019-10-14 10:43   ` Ferruh Yigit

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox