DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] app/testpmd: fix Tx first with LSC interrupt
@ 2017-07-25 10:27 David Hunt
  2017-08-01 12:54 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: David Hunt @ 2017-07-25 10:27 UTC (permalink / raw)
  To: dev; +Cc: jingjing.wu, David Hunt

The lsc_interrupt flag is enabled by default, and when the --tx-first is
used as a command line parameter, the 32 packets can be sent out before
the link state is up, resulting in the loss of the packets, and no further
forwarding will take place.

E.g. ./build/app/testpmd -c f0 -- --tx-first --stats-period 1

When the --tx-first is used, the lsc_interrupt flag needs to be disabled,
ensuring the links are up before forwarding traffic.  Therefore, during the
parameter checking at startup, if --tx-first is used, we now warn the user,
and set lsc_interrupt to 0.

Fixes: 99cabef08855 ("app/testpmd: add parameter to start forwarding Tx first")
Signed-off-by: David Hunt <david.hunt@intel.com>
---
 app/test-pmd/testpmd.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e754d12..4ca3445 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2326,6 +2326,13 @@ main(int argc, char** argv)
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
 				"interactive mode.\n");
+
+	if (tx_first && lsc_interrupt) {
+		printf("Warning: lsc_interrupt needs to be off when "
+				" using tx_first. Disabling.\n");
+		lsc_interrupt = 0;
+	}
+
 	if (!nb_rxq && !nb_txq)
 		printf("Warning: Either rx or tx queues should be non-zero\n");
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-03 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25 10:27 [dpdk-dev] [PATCH v1] app/testpmd: fix Tx first with LSC interrupt David Hunt
2017-08-01 12:54 ` De Lara Guarch, Pablo
2017-08-03 21:44   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).