DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: introduce QinQ and Rx offloads argument
@ 2019-09-13 12:14 viveksharma
  2019-09-29  4:28 ` Vivek Kumar Sharma
  2019-10-09  8:20 ` Ferruh Yigit
  0 siblings, 2 replies; 3+ messages in thread
From: viveksharma @ 2019-09-13 12:14 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 and for configuring all rx offloads.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             | 22 +++++++++++++++++++++-
 doc/guides/testpmd_app_ug/run_app.rst |  9 +++++++++
 3 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 1a5a5c1..42ae25e 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -530,9 +530,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 5244872..6f1870a 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -68,7 +68,8 @@ usage(char* progname)
 	       "--rss-ip | --rss-udp | "
 	       "--rxpt= | --rxht= | --rxwt= | --rxfreet= | "
 	       "--txpt= | --txht= | --txwt= | --txfreet= | "
-	       "--txrst= | --tx-offloads= | --vxlan-gpe-port= ]\n",
+	       "--txrst= | --tx-offloads= | | --rx-offloads= | "
+	       "--vxlan-gpe-port= ]\n",
 	       progname);
 #ifdef RTE_LIBRTE_CMDLINE
 	printf("  --interactive: run in interactive mode.\n");
@@ -135,6 +136,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 "
@@ -186,6 +188,7 @@ usage(char* progname)
 	printf("  --flow-isolate-all: "
 	       "requests flow API isolated mode on all ports at initialization time.\n");
 	printf("  --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n");
+	printf("  --rx-offloads=0xXXXXXXXX: hexadecimal bitmask of RX queue offloads\n");
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --mlockall: lock all memory\n");
@@ -607,6 +610,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 },
@@ -641,6 +645,7 @@ launch_args_parse(int argc, char** argv)
 		{ "print-event",		1, 0, 0 },
 		{ "mask-event",			1, 0, 0 },
 		{ "tx-offloads",		1, 0, 0 },
+		{ "rx-offloads",		1, 0, 0 },
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "mlockall",			0, 0, 0 },
@@ -994,6 +999,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;
 
@@ -1215,6 +1224,17 @@ launch_args_parse(int argc, char** argv)
 					rte_exit(EXIT_FAILURE,
 						 "tx-offloads must be >= 0\n");
 			}
+
+			if (!strcmp(lgopts[opt_idx].name, "rx-offloads")) {
+				char *end = NULL;
+				n = strtoull(optarg, &end, 16);
+				if (n >= 0)
+					rx_offloads = (uint64_t)n;
+				else
+					rte_exit(EXIT_FAILURE,
+						 "rx-offloads must be >= 0\n");
+			}
+
 			if (!strcmp(lgopts[opt_idx].name, "vxlan-gpe-port")) {
 				n = atoi(optarg);
 				if (n >= 0)
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index d0d89b3..ef677ba 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.
@@ -385,6 +389,11 @@ The command line options are:
     Set the hexadecimal bitmask of TX queue offloads.
     The default value is 0.
 
+*   ``--rx-offloads=0xXXXXXXXX``
+
+    Set the hexadecimal bitmask of RX queue offloads.
+    The default value is 0.
+
 *   ``--hot-plug``
 
     Enable device event monitor mechanism for hotplug.
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH] app/testpmd: introduce QinQ and Rx offloads argument
  2019-09-13 12:14 [dpdk-dev] [PATCH] app/testpmd: introduce QinQ and Rx offloads argument viveksharma
@ 2019-09-29  4:28 ` Vivek Kumar Sharma
  2019-10-09  8:20 ` Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Vivek Kumar Sharma @ 2019-09-29  4:28 UTC (permalink / raw)
  To: dev; +Cc: intoviveksharma, ferruh.yigit

Ping!


Thanks,
Vivek

________________________________________
From: viveksharma@marvell.com <viveksharma@marvell.com>
Sent: 13 September 2019 17:44
To: dev@dpdk.org
Cc: intoviveksharma@gmail.com; ferruh.yigit@intel.com; Vivek Kumar Sharma
Subject: [PATCH] app/testpmd: introduce QinQ and Rx offloads argument

From: Vivek Sharma <viveksharma@marvell.com>

Introduce boot time argument for configuring QinQ strip
offload and for configuring all rx offloads.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             | 22 +++++++++++++++++++++-
 doc/guides/testpmd_app_ug/run_app.rst |  9 +++++++++
 3 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 1a5a5c1..42ae25e 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -530,9 +530,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 5244872..6f1870a 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -68,7 +68,8 @@ usage(char* progname)
               "--rss-ip | --rss-udp | "
               "--rxpt= | --rxht= | --rxwt= | --rxfreet= | "
               "--txpt= | --txht= | --txwt= | --txfreet= | "
-              "--txrst= | --tx-offloads= | --vxlan-gpe-port= ]\n",
+              "--txrst= | --tx-offloads= | | --rx-offloads= | "
+              "--vxlan-gpe-port= ]\n",
               progname);
 #ifdef RTE_LIBRTE_CMDLINE
        printf("  --interactive: run in interactive mode.\n");
@@ -135,6 +136,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 "
@@ -186,6 +188,7 @@ usage(char* progname)
        printf("  --flow-isolate-all: "
               "requests flow API isolated mode on all ports at initialization time.\n");
        printf("  --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n");
+       printf("  --rx-offloads=0xXXXXXXXX: hexadecimal bitmask of RX queue offloads\n");
        printf("  --hot-plug: enable hot plug for device.\n");
        printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
        printf("  --mlockall: lock all memory\n");
@@ -607,6 +610,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 },
@@ -641,6 +645,7 @@ launch_args_parse(int argc, char** argv)
                { "print-event",                1, 0, 0 },
                { "mask-event",                 1, 0, 0 },
                { "tx-offloads",                1, 0, 0 },
+               { "rx-offloads",                1, 0, 0 },
                { "hot-plug",                   0, 0, 0 },
                { "vxlan-gpe-port",             1, 0, 0 },
                { "mlockall",                   0, 0, 0 },
@@ -994,6 +999,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;

@@ -1215,6 +1224,17 @@ launch_args_parse(int argc, char** argv)
                                        rte_exit(EXIT_FAILURE,
                                                 "tx-offloads must be >= 0\n");
                        }
+
+                       if (!strcmp(lgopts[opt_idx].name, "rx-offloads")) {
+                               char *end = NULL;
+                               n = strtoull(optarg, &end, 16);
+                               if (n >= 0)
+                                       rx_offloads = (uint64_t)n;
+                               else
+                                       rte_exit(EXIT_FAILURE,
+                                                "rx-offloads must be >= 0\n");
+                       }
+
                        if (!strcmp(lgopts[opt_idx].name, "vxlan-gpe-port")) {
                                n = atoi(optarg);
                                if (n >= 0)
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index d0d89b3..ef677ba 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.
@@ -385,6 +389,11 @@ The command line options are:
     Set the hexadecimal bitmask of TX queue offloads.
     The default value is 0.

+*   ``--rx-offloads=0xXXXXXXXX``
+
+    Set the hexadecimal bitmask of RX queue offloads.
+    The default value is 0.
+
 *   ``--hot-plug``

     Enable device event monitor mechanism for hotplug.
--
2.7.4


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

* Re: [dpdk-dev] [PATCH] app/testpmd: introduce QinQ and Rx offloads argument
  2019-09-13 12:14 [dpdk-dev] [PATCH] app/testpmd: introduce QinQ and Rx offloads argument viveksharma
  2019-09-29  4:28 ` Vivek Kumar Sharma
@ 2019-10-09  8:20 ` Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2019-10-09  8:20 UTC (permalink / raw)
  To: viveksharma, dev; +Cc: intoviveksharma

On 9/13/2019 1:14 PM, viveksharma@marvell.com wrote:
> From: Vivek Sharma <viveksharma@marvell.com>
> 
> Introduce boot time argument for configuring QinQ strip
> offload and for configuring all rx offloads.Fix port info
> display to distinguish between qinq strip and extend offloads.
> 
> Signed-off-by: Vivek Sharma <viveksharma@marvell.com>

<...>

> @@ -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.
> @@ -385,6 +389,11 @@ The command line options are:
>      Set the hexadecimal bitmask of TX queue offloads.
>      The default value is 0.
>  
> +*   ``--rx-offloads=0xXXXXXXXX``
> +
> +    Set the hexadecimal bitmask of RX queue offloads.
> +    The default value is 0.
> +
>  *   ``--hot-plug``
>  
>      Enable device event monitor mechanism for hotplug.
> 

+1 to both arguments, but they are independent/unrelated, can you please make
this two patches?

Thanks,
ferruh

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

end of thread, other threads:[~2019-10-09  8:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-13 12:14 [dpdk-dev] [PATCH] app/testpmd: introduce QinQ and Rx offloads argument viveksharma
2019-09-29  4:28 ` Vivek Kumar Sharma
2019-10-09  8:20 ` Ferruh Yigit

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