X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-fib%2Fmain.c;h=830c32cc444ad5ee72f8a28d59cdb9de7b573dfd;hb=08dfff78f200bb9f077b0006ef05ab59dbc40ac8;hp=9e6a4f223166127225098b29b90fdd9c2b7cc6cd;hpb=eda44ced0ec14677de6944c76955621c6182b2df;p=dpdk.git diff --git a/app/test-fib/main.c b/app/test-fib/main.c index 9e6a4f2231..830c32cc44 100644 --- a/app/test-fib/main.c +++ b/app/test-fib/main.c @@ -624,15 +624,15 @@ print_usage(void) "(if -f is not specified)>]\n" "[-r ]\n" - "[-c ]\n" + "[-c ]\n" "[-6 ]\n" "[-s ]\n" "[-a ]\n" - "[-b ]\n\tavailible options for ipv4\n" + "[-b ]\n\tavailable options for ipv4\n" "\t\trib - RIB based FIB\n" "\t\tdir - DIR24_8 based FIB\n" - "\tavailible options for ipv6:\n" + "\tavailable options for ipv6:\n" "\t\trib - RIB based FIB\n" "\t\ttrie - TRIE based FIB\n" "defaults are: dir for ipv4 and trie for ipv6\n" @@ -641,7 +641,7 @@ print_usage(void) "[-g ]\n" "[-w ]\n" "[-u ]\n" - "[-v ]\n", @@ -711,6 +711,10 @@ parse_opts(int argc, char **argv) print_usage(); rte_exit(-EINVAL, "Invalid option -n\n"); } + + if (config.nb_routes < config.print_fract) + config.print_fract = config.nb_routes; + break; case 'd': distrib_string = optarg; @@ -857,6 +861,7 @@ run_v4(void) conf.type = get_fib_type(); conf.default_nh = def_nh; conf.max_routes = config.nb_routes * 2; + conf.rib_ext_sz = 0; if (conf.type == RTE_FIB_DIR24_8) { conf.dir24_8.nh_sz = __builtin_ctz(config.ent_sz); conf.dir24_8.num_tbl8 = RTE_MIN(config.tbl8, @@ -1057,6 +1062,7 @@ run_v6(void) conf.type = get_fib_type(); conf.default_nh = def_nh; conf.max_routes = config.nb_routes * 2; + conf.rib_ext_sz = 0; if (conf.type == RTE_FIB6_TRIE) { conf.trie.nh_sz = __builtin_ctz(config.ent_sz); conf.trie.num_tbl8 = RTE_MIN(config.tbl8, @@ -1240,6 +1246,10 @@ main(int argc, char **argv) config.nb_routes = 0; while (fgets(line, sizeof(line), fr) != NULL) config.nb_routes++; + + if (config.nb_routes < config.print_fract) + config.print_fract = config.nb_routes; + rewind(fr); }