"(if -f is not specified)>]\n"
"[-r <percentage ratio of random ip's to lookup"
"(if -t is not specified)>]\n"
- "[-c <do comarison with LPM library>]\n"
+ "[-c <do comparison with LPM library>]\n"
"[-6 <do tests with ipv6 (default ipv4)>]\n"
"[-s <shuffle randomly generated routes>]\n"
"[-a <check nexthops for all ipv4 address space"
"(only valid with -c)>]\n"
- "[-b <fib algorithm>]\n\tavailible options for ipv4\n"
+ "[-b <fib algorithm>]\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"
"[-g <number of tbl8's for dir24_8 or trie FIBs>]\n"
"[-w <path to the file to dump routing table>]\n"
"[-u <path to the file to dump ip's for lookup>]\n"
- "[-v <type of loookup function:"
+ "[-v <type of lookup function:"
"\ts1, s2, s3 (3 types of scalar), v (vector) -"
" for DIR24_8 based FIB\n"
"\ts, v - for TRIE based ipv6 FIB>]\n",
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;
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,
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,
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);
}