[dpdk-dev] [PATCH 3/4] app/testpmd: add TSO disable to test options

Shahaf Shuler shahafs at mellanox.com
Wed Feb 22 17:09:59 CET 2017


Add the option to globaly disable hardware TSO offload
from the command line.

Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
---
 app/test-pmd/parameters.c             | 9 ++++++++-
 doc/guides/testpmd_app_ug/run_app.rst | 4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 28db8cd..7cd88bc 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -196,6 +196,7 @@
 		" or total packet length.\n");
 	printf("  --disable-link-check: disable check on link status when "
 	       "starting/stopping ports.\n");
+	printf("  --disable-tso: disable hardware TCP segmentation offload.\n");
 }
 
 #ifdef RTE_LIBRTE_CMDLINE
@@ -561,6 +562,7 @@
 		{ "no-flush-rx",	0, 0, 0 },
 		{ "txpkts",			1, 0, 0 },
 		{ "disable-link-check",		0, 0, 0 },
+		{ "disable-tso",		0, 0, 0 },
 		{ 0, 0, 0, 0 },
 	};
 
@@ -978,7 +980,12 @@
 				no_flush_rx = 1;
 			if (!strcmp(lgopts[opt_idx].name, "disable-link-check"))
 				no_link_check = 1;
-
+			if (!strcmp(lgopts[opt_idx].name, "disable-tso")) {
+				if (txq_flags < 0)
+					txq_flags = ETH_TXQ_FLAGS_NOTSOOFFL;
+				else
+					txq_flags |= ETH_TXQ_FLAGS_NOTSOOFFL;
+			}
 			break;
 		case 'h':
 			usage(argv[0]);
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 38a4025..58417ea 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -460,3 +460,7 @@ The commandline options are:
 *   ``--disable-link-check``
 
     Disable check on link status when starting/stopping ports.
+
+*   ``--disable-tso``
+
+    Disable hardware TCP segmentation offload.
-- 
1.8.3.1



More information about the dev mailing list