app/testpmd: introduce QinQ offload option
authorVivek Sharma <viveksharma@marvell.com>
Fri, 11 Oct 2019 02:36:54 +0000 (08:06 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:09 +0000 (16:43 +0200)
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>
app/test-pmd/parameters.c
doc/guides/testpmd_app_ug/run_app.rst

index 6c78dca..6885eed 100644 (file)
@@ -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;
 
index d0d89b3..9723cf5 100644 (file)
@@ -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.