DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix timeout in Rx queue flushing
@ 2016-09-08  9:49 James Poole
  2016-09-13 16:04 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: James Poole @ 2016-09-08  9:49 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, James Poole

When testpmd is run, the application would hang on the second time
that "start" is executed. This is because the timer limit would get
multiplied to an unreachably high number.

At the start of flush_fwd_rx_queues(), the timer limit now resets
to stop it from getting to this high number.

The timer has been made local for this function.

Fixes: f487715f36f5 ("app/testpmd: add timeout in Rx queue flushing")

Signed-off-by: James Poole <james.g.poole@intel.com>
---
 app/test-pmd/testpmd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 1428974..33a1403 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -272,9 +272,6 @@ uint32_t bypass_timeout = RTE_BYPASS_TMT_OFF;
 
 #endif
 
-/* default period is 1 second */
-static uint64_t timer_period = 1;
-
 /*
  * Ethernet device configuration.
  */
@@ -881,9 +878,10 @@ flush_fwd_rx_queues(void)
 	uint16_t  i;
 	uint8_t   j;
 	uint64_t prev_tsc = 0, diff_tsc, cur_tsc, timer_tsc = 0;
+	uint64_t timer_period;
 
 	/* convert to number of cycles */
-	timer_period *= rte_get_timer_hz();
+	timer_period = rte_get_timer_hz(); /* 1 second timeout */
 
 	for (j = 0; j < 2; j++) {
 		for (rxp = 0; rxp < cur_fwd_config.nb_fwd_ports; rxp++) {
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix timeout in Rx queue flushing
  2016-09-08  9:49 [dpdk-dev] [PATCH] app/testpmd: fix timeout in Rx queue flushing James Poole
@ 2016-09-13 16:04 ` Ferruh Yigit
  2016-09-23 18:20   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2016-09-13 16:04 UTC (permalink / raw)
  To: James Poole, dev; +Cc: pablo.de.lara.guarch

On 9/8/2016 10:49 AM, James Poole wrote:
> When testpmd is run, the application would hang on the second time
> that "start" is executed. This is because the timer limit would get
> multiplied to an unreachably high number.
> 
> At the start of flush_fwd_rx_queues(), the timer limit now resets
> to stop it from getting to this high number.
> 
> The timer has been made local for this function.
> 
> Fixes: f487715f36f5 ("app/testpmd: add timeout in Rx queue flushing")
> 
> Signed-off-by: James Poole <james.g.poole@intel.com>

Acked-by: <ferruh.yigit@intel.com>

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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix timeout in Rx queue flushing
  2016-09-13 16:04 ` Ferruh Yigit
@ 2016-09-23 18:20   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-09-23 18:20 UTC (permalink / raw)
  To: James Poole; +Cc: dev, Ferruh Yigit, pablo.de.lara.guarch

2016-09-13 17:04, Ferruh Yigit:
> On 9/8/2016 10:49 AM, James Poole wrote:
> > When testpmd is run, the application would hang on the second time
> > that "start" is executed. This is because the timer limit would get
> > multiplied to an unreachably high number.
> > 
> > At the start of flush_fwd_rx_queues(), the timer limit now resets
> > to stop it from getting to this high number.
> > 
> > The timer has been made local for this function.
> > 
> > Fixes: f487715f36f5 ("app/testpmd: add timeout in Rx queue flushing")
> > 
> > Signed-off-by: James Poole <james.g.poole@intel.com>
> 
> Acked-by: <ferruh.yigit@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-09-23 18:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08  9:49 [dpdk-dev] [PATCH] app/testpmd: fix timeout in Rx queue flushing James Poole
2016-09-13 16:04 ` Ferruh Yigit
2016-09-23 18:20   ` 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).