Lines Matching refs:ip
174 uint32_t ip = RTE_IPV4(0, 0, 0, 0), next_hop = 100; in test3() local
179 status = rte_lpm_add(NULL, ip, depth, next_hop); in test3()
187 status = rte_lpm_add(lpm, ip, 0, next_hop); in test3()
191 status = rte_lpm_add(lpm, ip, (MAX_DEPTH + 1), next_hop); in test3()
212 uint32_t ip = RTE_IPV4(0, 0, 0, 0); in test4() local
217 status = rte_lpm_delete(NULL, ip, depth); in test4()
225 status = rte_lpm_delete(lpm, ip, 0); in test4()
229 status = rte_lpm_delete(lpm, ip, (MAX_DEPTH + 1)); in test4()
251 uint32_t ip = RTE_IPV4(0, 0, 0, 0), next_hop_return = 0; in test5() local
255 status = rte_lpm_lookup(NULL, ip, &next_hop_return); in test5()
263 status = rte_lpm_lookup(lpm, ip, NULL); in test5()
285 uint32_t ip = RTE_IPV4(0, 0, 0, 0), next_hop_add = 100, next_hop_return = 0; in test6() local
292 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test6()
295 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test6()
298 status = rte_lpm_delete(lpm, ip, depth); in test6()
301 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test6()
324 uint32_t ip = RTE_IPV4(0, 0, 0, 0), next_hop_add = 100, next_hop_return = 0; in test7() local
331 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test7()
334 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test7()
337 ipx4 = vect_set_epi32(ip, ip + 0x100, ip - 0x100, ip); in test7()
344 status = rte_lpm_delete(lpm, ip, depth); in test7()
347 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test7()
460 uint32_t ip, ip_1, ip_2; in test9() local
466 ip = RTE_IPV4(128, 0, 0, 0); in test9()
473 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test9()
476 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
479 status = rte_lpm_delete(lpm, ip, depth); in test9()
482 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
488 ip = RTE_IPV4(128, 0, 0, 0); in test9()
492 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test9()
495 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
501 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test9()
504 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
509 status = rte_lpm_delete(lpm, ip, depth); in test9()
514 status = rte_lpm_delete(lpm, ip, depth); in test9()
517 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
524 ip = RTE_IPV4(128, 0, 0, 0); in test9()
528 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test9()
531 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
534 ip = RTE_IPV4(128, 0, 0, 5); in test9()
538 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test9()
541 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
544 status = rte_lpm_delete(lpm, ip, depth); in test9()
547 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
550 ip = RTE_IPV4(128, 0, 0, 0); in test9()
554 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
557 status = rte_lpm_delete(lpm, ip, depth); in test9()
560 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
629 uint32_t ip, next_hop_add, next_hop_return; in test10() local
638 ip = RTE_IPV4(128, 0, 0, 0); in test10()
642 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
645 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
648 status = rte_lpm_delete(lpm, ip, depth); in test10()
651 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
656 ip = RTE_IPV4(128, 0, 0, 0); in test10()
660 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
663 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
666 status = rte_lpm_delete(lpm, ip, depth); in test10()
674 ip = RTE_IPV4(128, 0, 0, 0); in test10()
678 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
681 ip = RTE_IPV4(128, 0, 0, 10); in test10()
685 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
688 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
691 ip = RTE_IPV4(128, 0, 0, 0); in test10()
694 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
697 ip = RTE_IPV4(128, 0, 0, 0); in test10()
700 status = rte_lpm_delete(lpm, ip, depth); in test10()
703 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
706 ip = RTE_IPV4(128, 0, 0, 10); in test10()
709 status = rte_lpm_delete(lpm, ip, depth); in test10()
712 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
720 ip = RTE_IPV4(128, 0, 0, 0); in test10()
724 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
727 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
732 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
735 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
738 status = rte_lpm_delete(lpm, ip, depth); in test10()
741 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
749 ip = RTE_IPV4(128, 0, 0, 0); in test10()
753 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
756 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
761 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
764 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
767 status = rte_lpm_delete(lpm, ip, depth); in test10()
770 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
777 ip = RTE_IPV4(128, 0, 0, 0); in test10()
780 status = rte_lpm_delete(lpm, ip, depth); in test10()
783 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
790 ip = RTE_IPV4(128, 0, 0, 0); in test10()
793 status = rte_lpm_delete(lpm, ip, depth); in test10()
796 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
820 uint32_t ip, next_hop_add, next_hop_return; in test11() local
827 ip = RTE_IPV4(128, 0, 0, 0); in test11()
831 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test11()
834 ip = RTE_IPV4(128, 0, 0, 10); in test11()
838 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test11()
841 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test11()
844 ip = RTE_IPV4(128, 0, 0, 0); in test11()
847 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test11()
850 ip = RTE_IPV4(128, 0, 0, 0); in test11()
853 status = rte_lpm_delete(lpm, ip, depth); in test11()
856 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test11()
859 ip = RTE_IPV4(128, 0, 0, 10); in test11()
862 status = rte_lpm_delete(lpm, ip, depth); in test11()
865 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test11()
891 uint32_t ip, i, next_hop_add, next_hop_return; in test12() local
898 ip = RTE_IPV4(128, 0, 0, 0); in test12()
903 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test12()
906 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test12()
910 ipx4 = vect_set_epi32(ip, ip + 1, ip, ip - 1); in test12()
917 status = rte_lpm_delete(lpm, ip, depth); in test12()
920 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test12()
946 uint32_t ip, i, next_hop_add_1, next_hop_add_2, next_hop_return; in test13() local
953 ip = RTE_IPV4(128, 0, 0, 0); in test13()
957 status = rte_lpm_add(lpm, ip, depth, next_hop_add_1); in test13()
960 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test13()
967 status = rte_lpm_add(lpm, ip, depth, next_hop_add_2); in test13()
970 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test13()
974 status = rte_lpm_delete(lpm, ip, depth); in test13()
977 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test13()
984 status = rte_lpm_delete(lpm, ip, depth); in test13()
987 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test13()
1013 uint32_t ip, next_hop_add, next_hop_return; in test14() local
1023 ip = RTE_IPV4(0, 0, 0, 0); in test14()
1026 for (; ip <= RTE_IPV4(0, 0, 255, 0); ip += 256) { in test14()
1027 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test14()
1030 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test14()
1037 ip = RTE_IPV4(1, 0, 0, 0); in test14()
1040 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test14()
1092 uint32_t ip; in test16() local
1101 for (ip = 0; ip < 0xFFFFFF; ip++) { in test16()
1104 if (rte_lpm_add(lpm, (ip << 8) + 0xF0, 30, 0) < 0) in test16()
1108 if (ip != NUMBER_TBL8S) { in test16()
1111 (unsigned)ip, (unsigned)NUMBER_TBL8S); in test16()
1219 uint32_t ip, next_hop; in test18() local
1230 ip = RTE_IPV4(192, 168, 100, 100); in test18()
1233 rte_lpm_add(lpm, ip, depth, next_hop); in test18()
1235 TEST_LPM_ASSERT(lpm->tbl24[ip>>8].valid_group); in test18()
1236 tbl8_group_index = lpm->tbl24[ip>>8].group_idx; in test18()
1240 rte_lpm_add(lpm, ip, depth, next_hop); in test18()
1241 TEST_LPM_ASSERT(lpm->tbl24[ip>>8].valid_group); in test18()
1244 rte_lpm_delete(lpm, ip, depth); in test18()
1246 TEST_LPM_ASSERT(!lpm->tbl24[ip>>8].valid_group); in test18()
1249 rte_lpm_add(lpm, ip, depth, next_hop); in test18()
1251 TEST_LPM_ASSERT(lpm->tbl24[ip>>8].valid_group); in test18()
1252 TEST_LPM_ASSERT(tbl8_group_index == lpm->tbl24[ip>>8].group_idx); in test18()
1256 rte_lpm_add(lpm, ip, depth, next_hop); in test18()
1257 TEST_LPM_ASSERT(lpm->tbl24[ip>>8].valid_group); in test18()
1260 rte_lpm_delete(lpm, ip, depth); in test18()
1262 TEST_LPM_ASSERT(!lpm->tbl24[ip>>8].valid_group); in test18()
1265 rte_lpm_add(lpm, ip, depth, next_hop); in test18()
1267 TEST_LPM_ASSERT(lpm->tbl24[ip>>8].valid_group); in test18()
1268 TEST_LPM_ASSERT(tbl8_group_index == lpm->tbl24[ip>>8].group_idx); in test18()
1359 uint32_t ip, next_hop, next_hop_return; in test20() local
1385 ip = RTE_IPV4(192, 0, 2, 100); in test20()
1388 status = rte_lpm_add(lpm, ip, depth, next_hop); in test20()
1390 TEST_LPM_ASSERT(lpm->tbl24[ip>>8].valid_group); in test20()
1397 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test20()
1402 status = rte_lpm_delete(lpm, ip, depth); in test20()
1404 TEST_LPM_ASSERT(!lpm->tbl24[ip>>8].valid); in test20()
1406 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test20()
1409 status = rte_lpm_add(lpm, ip, depth, next_hop); in test20()
1415 status = rte_lpm_add(lpm, ip, depth, next_hop); in test20()
1422 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test20()