app/test: fix crash when checking LPM performance twice
authorNikita Kozlov <nikita@elyzion.net>
Tue, 1 Nov 2016 11:55:55 +0000 (12:55 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 6 Nov 2016 22:55:15 +0000 (23:55 +0100)
num_route_entries needs to be resetted.

Fixes: 17d60f5b5eea ("app/test: remove large IPv4 LPM data file")

Signed-off-by: Nikita Kozlov <nikita@elyzion.net>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
app/test/test_lpm_perf.c

index 608e17a..e7e1281 100644 (file)
@@ -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++) {