summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Nikhilesh <pbhagavatula@marvell.com>2019-11-11 18:49:11 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-11 16:15:37 +0100
commit9731df2e75544e7b8d8dd382246545b638783c13 (patch)
treec6aba868a684bbeedc3f57e43d8c485dc8ce8592
parent4c634d7392fa7f330896544e2ca88a93b0d06d80 (diff)
downloaddpdk-9731df2e75544e7b8d8dd382246545b638783c13.zip
dpdk-9731df2e75544e7b8d8dd382246545b638783c13.tar.gz
dpdk-9731df2e75544e7b8d8dd382246545b638783c13.tar.xz
examples/l2fwd: disable packet type parsing
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>
-rw-r--r--examples/l2fwd/Makefile2
-rw-r--r--examples/l2fwd/main.c5
-rw-r--r--examples/l2fwd/meson.build2
3 files changed, 9 insertions, 0 deletions
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 2303520..59b2b4a 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -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
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index d7bcbfa..09257aa 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -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)
diff --git a/examples/l2fwd/meson.build b/examples/l2fwd/meson.build
index c34e11e..50d88ca 100644
--- a/examples/l2fwd/meson.build
+++ b/examples/l2fwd/meson.build
@@ -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'
)