[dpdk-dev] l2fwd_fork: fix missing updating the prev_tsc

Message ID 1487815258-58112-1-git-send-email-zhiyong.yang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Yang, Zhiyong Feb. 23, 2017, 2 a.m. UTC
  To miss updating the variable prev_tsc in function l2fwd_main_loop()
The patch fixes it.

Fixes:e2366e74e029("examples: use buffered Tx")
CC: sergio.gonzalez.monroy@intel.com

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
 examples/multi_process/l2fwd_fork/main.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Yang, Zhiyong April 28, 2017, 9:23 a.m. UTC | #1
Hi,  Thomas:
	The patch is always not noticed by anyone.
Could  it be applied to 17.05 ?  it indeed is a bug.

Thanks
Zhiyong

> -----Original Message-----

> From: Yang, Zhiyong

> Sent: Thursday, February 23, 2017 10:01 AM

> To: dev@dpdk.org

> Cc: Gonzalez Monroy, Sergio <sergio.gonzalez.monroy@intel.com>; Yang,

> Zhiyong <zhiyong.yang@intel.com>

> Subject: [PATCH] l2fwd_fork: fix missing updating the prev_tsc

> 

> To miss updating the variable prev_tsc in function l2fwd_main_loop() The patch

> fixes it.

> 

> Fixes:e2366e74e029("examples: use buffered Tx")

> CC: sergio.gonzalez.monroy@intel.com

> 

> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>

> ---

>  examples/multi_process/l2fwd_fork/main.c | 2 ++

>  1 file changed, 2 insertions(+)

> 

> diff --git a/examples/multi_process/l2fwd_fork/main.c

> b/examples/multi_process/l2fwd_fork/main.c

> index 2d951d9..6052c84 100644

> --- a/examples/multi_process/l2fwd_fork/main.c

> +++ b/examples/multi_process/l2fwd_fork/main.c

> @@ -672,6 +672,8 @@ l2fwd_main_loop(void)

>  					port_statistics[portid].tx += sent;

> 

>  			}

> +

> +			prev_tsc = cur_tsc;

>  		}

> 

>  		/*

> --

> 2.7.4
  
Thomas Monjalon May 1, 2017, 2:31 p.m. UTC | #2
23/02/2017 03:00, Zhiyong Yang:
> To miss updating the variable prev_tsc in function l2fwd_main_loop()
> The patch fixes it.
> 
> Fixes:e2366e74e029("examples: use buffered Tx")
> CC: sergio.gonzalez.monroy@intel.com
> 
> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>

Applied, thanks
  

Patch

diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index 2d951d9..6052c84 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -672,6 +672,8 @@  l2fwd_main_loop(void)
 					port_statistics[portid].tx += sent;
 
 			}
+
+			prev_tsc = cur_tsc;
 		}
 
 		/*