]> git.droids-corp.org - dpdk.git/commitdiff
examples/l2fwd: disable packet type parsing
authorPavan Nikhilesh <pbhagavatula@marvell.com>
Mon, 11 Nov 2019 13:19:11 +0000 (18:49 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 11 Nov 2019 15:15:37 +0000 (16:15 +0100)
Disable packet type parsing as l2fwd doesn't rely on packet types.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
examples/l2fwd/Makefile
examples/l2fwd/main.c
examples/l2fwd/meson.build

index 230352093837daf3f4fb44a985bc39b08fef0360..59b2b4ab4ac2c19920157614bd36970d2324f4e2 100644 (file)
@@ -51,6 +51,8 @@ include $(RTE_SDK)/mk/rte.vars.mk
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+# Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype API
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 include $(RTE_SDK)/mk/rte.extapp.mk
 endif
index d7bcbfae78cd3df8e543bd687517e8ef306d6841..09257aab1c8a1e2e4a0a91c5ca96243d423970ef 100644 (file)
@@ -713,6 +713,11 @@ main(int argc, char **argv)
                        "Cannot set error callback for tx buffer on port %u\n",
                                 portid);
 
+               ret = rte_eth_dev_set_ptypes(portid, RTE_PTYPE_UNKNOWN, NULL,
+                                            0);
+               if (ret < 0)
+                       printf("Port %u, Failed to disable Ptype parsing\n",
+                                       portid);
                /* Start device */
                ret = rte_eth_dev_start(portid);
                if (ret < 0)
index c34e11e36d214b8deea947d0ae346b0a05db27d9..50d88caa0ae160b773870b9f986dffb908166f8b 100644 (file)
@@ -6,6 +6,8 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
+# Enable experimental API flag as l2fwd uses rte_ethdev_set_ptype API
+allow_experimental_apis = true
 sources = files(
        'main.c'
 )