diff mbox

[dpdk-dev] app/testpmd: fix redundant time update

Message ID 1468574350-1275-1-git-send-email-reshma.pattan@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Pattan, Reshma July 15, 2016, 9:19 a.m. UTC
Inside flush_fwd_rx_queues removed redundant prev_tsc update with cur_tsc,
as prev_tsc value is always updated with rte_rdtsc() in for loop.

Coverity issue: 127797

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

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 app/test-pmd/testpmd.c | 1 -
 1 file changed, 1 deletion(-)

Comments

De Lara Guarch, Pablo July 15, 2016, 9:58 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Reshma Pattan
> Sent: Friday, July 15, 2016 10:19 AM
> To: dev@dpdk.org
> Cc: Pattan, Reshma
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix redundant time update
> 
> Inside flush_fwd_rx_queues removed redundant prev_tsc update with
> cur_tsc,
> as prev_tsc value is always updated with rte_rdtsc() in for loop.
> 
> Coverity issue: 127797
> 
> Fixes: f487715f36f5 ("app/testpmd: add timeout in Rx queue flushing")
> 
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Thomas Monjalon July 15, 2016, 9:41 p.m. UTC | #2
> > Inside flush_fwd_rx_queues removed redundant prev_tsc update with
> > cur_tsc,
> > as prev_tsc value is always updated with rte_rdtsc() in for loop.
> > 
> > Coverity issue: 127797
> > 
> > Fixes: f487715f36f5 ("app/testpmd: add timeout in Rx queue flushing")
> > 
> > Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied, thanks
diff mbox

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index b7f28e9..1428974 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -907,7 +907,6 @@  flush_fwd_rx_queues(void)
 					timer_tsc += diff_tsc;
 				} while ((nb_rx > 0) &&
 					(timer_tsc < timer_period));
-				prev_tsc = cur_tsc;
 				timer_tsc = 0;
 			}
 		}