[dpdk-dev] app/test: fix a segfault when lpm_perf_autotest is run more than 1 time

Message ID 20161101104742.12307-1-nikita@elyzion.net (mailing list archive)
State Superseded, archived
Headers

Commit Message

Nikita Kozlov Nov. 1, 2016, 10:47 a.m. UTC
  num_route_entries need to be reseted.
---
 app/test/test_lpm_perf.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Bruce Richardson Nov. 1, 2016, 11:20 a.m. UTC | #1
On Tue, Nov 01, 2016 at 11:47:42AM +0100, Nikita Kozlov wrote:
> num_route_entries need to be reseted.
> ---
>  app/test/test_lpm_perf.c | 1 +
>  1 file changed, 1 insertion(+)
> 
You forgot your signoff on the patch, but I confirm it does indeed fix
the issue. Also, as fixes line is needed to identify the commit that
introduced the bug.

Tested-by: Bruce Richardson <bruce.richardson@intel.com>
  

Patch

diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c
index 608e17a..e7e1281 100644
--- a/app/test/test_lpm_perf.c
+++ b/app/test/test_lpm_perf.c
@@ -301,6 +301,7 @@  static void generate_large_route_rule_table(void)
 	uint32_t ip_class;
 	uint8_t  depth;
 
+	num_route_entries = 0;
 	memset(large_route_table, 0, sizeof(large_route_table));
 
 	for (ip_class = IP_CLASS_A; ip_class <= IP_CLASS_C; ip_class++) {