Thread (14 messages) 14 messages, 3 authors, 2017-03-06
STALE3432d

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

From: Shahaf Shuler <hidden>
Date: 2017-02-22 16:10:22
Subsystem: the rest · Maintainer: Linus Torvalds

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

Signed-off-by: Shahaf Shuler <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help