[dpdk-dev,4/5] app/testpmd: add command line option for mbuf fast free
Checks
Commit Message
This patch enables mbuf fast free Tx offloads from the command line.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
app/test-pmd/parameters.c | 5 +++++
doc/guides/testpmd_app_ug/run_app.rst | 4 ++++
2 files changed, 9 insertions(+)
@@ -216,6 +216,8 @@ usage(char* progname)
"requests flow API isolated mode on all ports at initialization time.\n");
printf(" --enable-multiseg: "
"enables multi segment send Tx offload on all ports.\n");
+ printf(" --enable-fast-free: "
+ "enables mbuf fast free Tx offload on all ports.\n");
}
#ifdef RTE_LIBRTE_CMDLINE
@@ -647,6 +649,7 @@ launch_args_parse(int argc, char** argv)
{ "print-event", 1, 0, 0 },
{ "mask-event", 1, 0, 0 },
{ "enable-multiseg", 0, 0, 0 },
+ { "enable-fast-free", 0, 0, 0 },
{ 0, 0, 0, 0 },
};
@@ -1122,6 +1125,8 @@ launch_args_parse(int argc, char** argv)
}
if (!strcmp(lgopts[opt_idx].name, "enable-multiseg"))
tx_offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
+ if (!strcmp(lgopts[opt_idx].name, "enable-fast-free"))
+ tx_offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;
break;
case 'h':
@@ -501,3 +501,7 @@ The commandline options are:
* ``--enable-multiseg``
Enables multi segment send Tx offload on all ports.
+
+* ``--enable-fast-free``
+
+ Enables mbuf fast free Tx offload on all ports.