summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Nikhilesh <pbhagavatula@marvell.com>2019-11-11 18:49:13 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-11 16:15:37 +0100
commitb0a9354ae7850bc1fca1a518cca28c5c8e9ba8f6 (patch)
treec941c3d31158607a2f3dcb17026d5f9604d4f5ce
parente48491afb86a17f70ce76e85741bd746afff4f16 (diff)
downloaddpdk-b0a9354ae7850bc1fca1a518cca28c5c8e9ba8f6.zip
dpdk-b0a9354ae7850bc1fca1a518cca28c5c8e9ba8f6.tar.gz
dpdk-b0a9354ae7850bc1fca1a518cca28c5c8e9ba8f6.tar.xz
app/testpmd: disable packet type parsing by default
Disable packey type parsing on port init, user can enable ptype parsing by issuing set ptype command. Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
-rw-r--r--app/test-pmd/cmdline.c2
-rw-r--r--app/test-pmd/testpmd.c12
-rw-r--r--app/test-pmd/testpmd.h1
-rw-r--r--doc/guides/rel_notes/release_19_11.rst1
4 files changed, 16 insertions, 0 deletions
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 3be8a50..ff2d18f 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -19082,6 +19082,8 @@ cmd_set_port_ptypes_parsed(
rte_get_ptype_name(ptypes[i], ptype_name, sizeof(ptype_name));
printf("%s\n", ptype_name);
}
+
+ clear_ptypes = false;
}
cmdline_parse_inst_t cmd_set_port_ptypes = {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 4444346..446da36 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -359,6 +359,9 @@ uint8_t hot_plug = 0; /**< hotplug disabled by default. */
/* After attach, port setup is called on event or by iterator */
bool setup_on_probe_event = true;
+/* Clear ptypes on port initialization. */
+uint8_t clear_ptypes = true;
+
/* Pretty printing of ethdev events */
static const char * const eth_event_desc[] = {
[RTE_ETH_EVENT_UNKNOWN] = "unknown",
@@ -2269,6 +2272,15 @@ start_port(portid_t pid)
return -1;
}
configure_rxtx_dump_callbacks(verbose_level);
+ if (clear_ptypes) {
+ diag = rte_eth_dev_set_ptypes(pi, RTE_PTYPE_UNKNOWN,
+ NULL, 0);
+ if (diag < 0)
+ printf(
+ "Port %d: Failed to disable Ptype parsing\n",
+ pi);
+ }
+
/* start port */
if (rte_eth_dev_start(pi) < 0) {
printf("Fail to start port %d\n", pi);
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index caabf32..90694a3 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -334,6 +334,7 @@ extern uint32_t event_print_mask;
extern bool setup_on_probe_event; /**< disabled by port setup-on iterator */
extern uint8_t hot_plug; /**< enable by "--hot-plug" parameter */
extern int do_mlockall; /**< set by "--mlockall" or "--no-mlockall" parameter */
+extern uint8_t clear_ptypes; /**< disabled by set ptype cmd */
#ifdef RTE_LIBRTE_IXGBE_BYPASS
extern uint32_t bypass_timeout; /**< Store the NIC bypass watchdog timeout */
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index d2c8d16..0d04b8d 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -277,6 +277,7 @@ New Features
* Added a console command to testpmd app, ``show port (port_id) ptypes`` which
gives ability to print port supported ptypes in different protocol layers.
+ * Packet type detection disabled by default for the supported PMDs.
* **Added new example l2fwd-event application.**