Lines Matching refs:status
176 int32_t status = 0; in test3() local
179 status = rte_lpm_add(NULL, ip, depth, next_hop); in test3()
180 TEST_LPM_ASSERT(status < 0); in test3()
187 status = rte_lpm_add(lpm, ip, 0, next_hop); in test3()
188 TEST_LPM_ASSERT(status < 0); in test3()
191 status = rte_lpm_add(lpm, ip, (MAX_DEPTH + 1), next_hop); in test3()
192 TEST_LPM_ASSERT(status < 0); in test3()
214 int32_t status = 0; in test4() local
217 status = rte_lpm_delete(NULL, ip, depth); in test4()
218 TEST_LPM_ASSERT(status < 0); in test4()
225 status = rte_lpm_delete(lpm, ip, 0); in test4()
226 TEST_LPM_ASSERT(status < 0); in test4()
229 status = rte_lpm_delete(lpm, ip, (MAX_DEPTH + 1)); in test4()
230 TEST_LPM_ASSERT(status < 0); in test4()
252 int32_t status = 0; in test5() local
255 status = rte_lpm_lookup(NULL, ip, &next_hop_return); in test5()
256 TEST_LPM_ASSERT(status < 0); in test5()
263 status = rte_lpm_lookup(lpm, ip, NULL); in test5()
264 TEST_LPM_ASSERT(status < 0); in test5()
287 int32_t status = 0; in test6() local
292 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test6()
293 TEST_LPM_ASSERT(status == 0); in test6()
295 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test6()
296 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test6()
298 status = rte_lpm_delete(lpm, ip, depth); in test6()
299 TEST_LPM_ASSERT(status == 0); in test6()
301 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test6()
302 TEST_LPM_ASSERT(status == -ENOENT); in test6()
326 int32_t status = 0; in test7() local
331 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test7()
332 TEST_LPM_ASSERT(status == 0); in test7()
334 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test7()
335 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test7()
344 status = rte_lpm_delete(lpm, ip, depth); in test7()
345 TEST_LPM_ASSERT(status == 0); in test7()
347 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test7()
348 TEST_LPM_ASSERT(status == -ENOENT); in test7()
378 int32_t status = 0; in test8() local
388 status = rte_lpm_add(lpm, ip2, depth, next_hop_add); in test8()
389 TEST_LPM_ASSERT(status == 0); in test8()
392 status = rte_lpm_lookup(lpm, ip1, &next_hop_return); in test8()
393 TEST_LPM_ASSERT(status == -ENOENT); in test8()
395 status = rte_lpm_lookup(lpm, ip2, &next_hop_return); in test8()
396 TEST_LPM_ASSERT((status == 0) && in test8()
411 status = rte_lpm_delete(lpm, ip2, depth); in test8()
412 TEST_LPM_ASSERT(status == 0); in test8()
414 status = rte_lpm_lookup(lpm, ip2, &next_hop_return); in test8()
417 TEST_LPM_ASSERT((status == 0) && in test8()
420 TEST_LPM_ASSERT(status == -ENOENT); in test8()
423 status = rte_lpm_lookup(lpm, ip1, &next_hop_return); in test8()
424 TEST_LPM_ASSERT(status == -ENOENT); in test8()
463 int32_t status = 0; in test9() local
473 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test9()
474 TEST_LPM_ASSERT(status == 0); in test9()
476 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
477 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test9()
479 status = rte_lpm_delete(lpm, ip, depth); in test9()
480 TEST_LPM_ASSERT(status == 0); in test9()
482 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
483 TEST_LPM_ASSERT(status == -ENOENT); in test9()
492 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test9()
493 TEST_LPM_ASSERT(status == 0); in test9()
495 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
496 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test9()
501 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test9()
502 TEST_LPM_ASSERT(status == 0); in test9()
504 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
505 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test9()
509 status = rte_lpm_delete(lpm, ip, depth); in test9()
510 TEST_LPM_ASSERT(status == 0); in test9()
514 status = rte_lpm_delete(lpm, ip, depth); in test9()
515 TEST_LPM_ASSERT(status == 0); in test9()
517 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
518 TEST_LPM_ASSERT(status == -ENOENT); in test9()
528 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test9()
529 TEST_LPM_ASSERT(status == 0); in test9()
531 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
532 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test9()
538 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test9()
539 TEST_LPM_ASSERT(status == 0); in test9()
541 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
542 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test9()
544 status = rte_lpm_delete(lpm, ip, depth); in test9()
545 TEST_LPM_ASSERT(status == 0); in test9()
547 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
548 TEST_LPM_ASSERT(status == -ENOENT); in test9()
554 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
555 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test9()
557 status = rte_lpm_delete(lpm, ip, depth); in test9()
558 TEST_LPM_ASSERT(status == 0); in test9()
560 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test9()
561 TEST_LPM_ASSERT(status == -ENOENT); in test9()
577 status = rte_lpm_add(lpm, ip_1, depth_1, next_hop_add_1); in test9()
578 TEST_LPM_ASSERT(status == 0); in test9()
580 status = rte_lpm_lookup(lpm, ip_1, &next_hop_return); in test9()
581 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add_1)); in test9()
583 status = rte_lpm_add(lpm, ip_2, depth_2, next_hop_add_2); in test9()
584 TEST_LPM_ASSERT(status == 0); in test9()
586 status = rte_lpm_lookup(lpm, ip_2, &next_hop_return); in test9()
587 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add_2)); in test9()
589 status = rte_lpm_delete(lpm, ip_2, depth_2); in test9()
590 TEST_LPM_ASSERT(status == 0); in test9()
592 status = rte_lpm_lookup(lpm, ip_2, &next_hop_return); in test9()
593 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add_1)); in test9()
595 status = rte_lpm_delete(lpm, ip_1, depth_1); in test9()
596 TEST_LPM_ASSERT(status == 0); in test9()
598 status = rte_lpm_lookup(lpm, ip_1, &next_hop_return); in test9()
599 TEST_LPM_ASSERT(status == -ENOENT); in test9()
631 int32_t status = 0; in test10() local
642 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
643 TEST_LPM_ASSERT(status == 0); in test10()
645 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
646 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test10()
648 status = rte_lpm_delete(lpm, ip, depth); in test10()
649 TEST_LPM_ASSERT(status == 0); in test10()
651 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
652 TEST_LPM_ASSERT(status == -ENOENT); in test10()
660 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
661 TEST_LPM_ASSERT(status == 0); in test10()
663 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
664 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test10()
666 status = rte_lpm_delete(lpm, ip, depth); in test10()
667 TEST_LPM_ASSERT(status == 0); in test10()
678 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
679 TEST_LPM_ASSERT(status == 0); in test10()
685 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
686 TEST_LPM_ASSERT(status == 0); in test10()
688 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
689 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test10()
694 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
695 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test10()
700 status = rte_lpm_delete(lpm, ip, depth); in test10()
701 TEST_LPM_ASSERT(status == 0); in test10()
703 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
704 TEST_LPM_ASSERT(status == -ENOENT); in test10()
709 status = rte_lpm_delete(lpm, ip, depth); in test10()
710 TEST_LPM_ASSERT(status == 0); in test10()
712 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
713 TEST_LPM_ASSERT(status == -ENOENT); in test10()
724 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
725 TEST_LPM_ASSERT(status == 0); in test10()
727 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
728 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test10()
732 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
733 TEST_LPM_ASSERT(status == 0); in test10()
735 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
736 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test10()
738 status = rte_lpm_delete(lpm, ip, depth); in test10()
739 TEST_LPM_ASSERT(status == 0); in test10()
741 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
742 TEST_LPM_ASSERT(status == -ENOENT); in test10()
753 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
754 TEST_LPM_ASSERT(status == 0); in test10()
756 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
757 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test10()
761 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test10()
762 TEST_LPM_ASSERT(status == 0); in test10()
764 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
765 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test10()
767 status = rte_lpm_delete(lpm, ip, depth); in test10()
768 TEST_LPM_ASSERT(status == 0); in test10()
770 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
771 TEST_LPM_ASSERT(status == -ENOENT); in test10()
780 status = rte_lpm_delete(lpm, ip, depth); in test10()
781 TEST_LPM_ASSERT(status < 0); in test10()
783 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
784 TEST_LPM_ASSERT(status == -ENOENT); in test10()
793 status = rte_lpm_delete(lpm, ip, depth); in test10()
794 TEST_LPM_ASSERT(status < 0); in test10()
796 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test10()
797 TEST_LPM_ASSERT(status == -ENOENT); in test10()
822 int32_t status = 0; in test11() local
831 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test11()
832 TEST_LPM_ASSERT(status == 0); in test11()
838 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test11()
839 TEST_LPM_ASSERT(status == 0); in test11()
841 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test11()
842 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test11()
847 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test11()
848 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add)); in test11()
853 status = rte_lpm_delete(lpm, ip, depth); in test11()
854 TEST_LPM_ASSERT(status == 0); in test11()
856 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test11()
857 TEST_LPM_ASSERT(status == -ENOENT); in test11()
862 status = rte_lpm_delete(lpm, ip, depth); in test11()
863 TEST_LPM_ASSERT(status == 0); in test11()
865 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test11()
866 TEST_LPM_ASSERT(status == -ENOENT); in test11()
893 int32_t status = 0; in test12() local
903 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test12()
904 TEST_LPM_ASSERT(status == 0); in test12()
906 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test12()
907 TEST_LPM_ASSERT((status == 0) && in test12()
917 status = rte_lpm_delete(lpm, ip, depth); in test12()
918 TEST_LPM_ASSERT(status == 0); in test12()
920 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test12()
921 TEST_LPM_ASSERT(status == -ENOENT); in test12()
948 int32_t status = 0; in test13() local
957 status = rte_lpm_add(lpm, ip, depth, next_hop_add_1); in test13()
958 TEST_LPM_ASSERT(status == 0); in test13()
960 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test13()
961 TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add_1)); in test13()
967 status = rte_lpm_add(lpm, ip, depth, next_hop_add_2); in test13()
968 TEST_LPM_ASSERT(status == 0); in test13()
970 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test13()
971 TEST_LPM_ASSERT((status == 0) && in test13()
974 status = rte_lpm_delete(lpm, ip, depth); in test13()
975 TEST_LPM_ASSERT(status == 0); in test13()
977 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test13()
978 TEST_LPM_ASSERT((status == 0) && in test13()
984 status = rte_lpm_delete(lpm, ip, depth); in test13()
985 TEST_LPM_ASSERT(status == 0); in test13()
987 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test13()
988 TEST_LPM_ASSERT(status == -ENOENT); in test13()
1015 int32_t status = 0; in test14() local
1027 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test14()
1028 TEST_LPM_ASSERT(status == 0); in test14()
1030 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test14()
1031 TEST_LPM_ASSERT((status == 0) && in test14()
1040 status = rte_lpm_add(lpm, ip, depth, next_hop_add); in test14()
1041 TEST_LPM_ASSERT(status < 0); in test14()
1144 int32_t status = 0; in test17() local
1149 if ((status = rte_lpm_add(lpm, ip_10_32, d_ip_10_32, in test17()
1153 status = rte_lpm_lookup(lpm, ip_10_32, &next_hop_return); in test17()
1155 TEST_LPM_ASSERT(status == 0); in test17()
1158 if ((status = rte_lpm_add(lpm, ip_10_24, d_ip_10_24, in test17()
1162 status = rte_lpm_lookup(lpm, ip_10_24, &next_hop_return); in test17()
1164 TEST_LPM_ASSERT(status == 0); in test17()
1167 if ((status = rte_lpm_add(lpm, ip_20_25, d_ip_20_25, in test17()
1171 status = rte_lpm_lookup(lpm, ip_20_25, &next_hop_return); in test17()
1173 TEST_LPM_ASSERT(status == 0); in test17()
1186 status = rte_lpm_lookup(lpm, ip_10_32, &next_hop_return); in test17()
1187 TEST_LPM_ASSERT(status == 0); in test17()
1190 status = rte_lpm_lookup(lpm, ip_10_24, &next_hop_return); in test17()
1191 TEST_LPM_ASSERT(status == 0); in test17()
1289 int32_t status; in test19() local
1305 status = rte_rcu_qsbr_init(qsv, RTE_MAX_LCORE); in test19()
1306 TEST_LPM_ASSERT(status == 0); in test19()
1311 status = rte_lpm_rcu_qsbr_add(lpm, &rcu_cfg); in test19()
1312 TEST_LPM_ASSERT(status != 0); in test19()
1316 status = rte_lpm_rcu_qsbr_add(lpm, &rcu_cfg); in test19()
1317 TEST_LPM_ASSERT(status == 0); in test19()
1326 status = rte_lpm_rcu_qsbr_add(lpm, &rcu_cfg); in test19()
1327 TEST_LPM_ASSERT(status != 0); in test19()
1358 int32_t status; in test20() local
1376 status = rte_rcu_qsbr_init(qsv, 1); in test20()
1377 TEST_LPM_ASSERT(status == 0); in test20()
1382 status = rte_lpm_rcu_qsbr_add(lpm, &rcu_cfg); in test20()
1383 TEST_LPM_ASSERT(status == 0); in test20()
1388 status = rte_lpm_add(lpm, ip, depth, next_hop); in test20()
1389 TEST_LPM_ASSERT(status == 0); in test20()
1393 status = rte_rcu_qsbr_thread_register(qsv, 0); in test20()
1394 TEST_LPM_ASSERT(status == 0); in test20()
1397 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test20()
1398 TEST_LPM_ASSERT(status == 0); in test20()
1402 status = rte_lpm_delete(lpm, ip, depth); in test20()
1403 TEST_LPM_ASSERT(status == 0); in test20()
1406 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test20()
1407 TEST_LPM_ASSERT(status != 0); in test20()
1409 status = rte_lpm_add(lpm, ip, depth, next_hop); in test20()
1410 TEST_LPM_ASSERT(status != 0); in test20()
1415 status = rte_lpm_add(lpm, ip, depth, next_hop); in test20()
1416 TEST_LPM_ASSERT(status == 0); in test20()
1419 status = rte_rcu_qsbr_thread_unregister(qsv, 0); in test20()
1420 TEST_LPM_ASSERT(status == 0); in test20()
1422 status = rte_lpm_lookup(lpm, ip, &next_hop_return); in test20()
1423 TEST_LPM_ASSERT(status == 0); in test20()
1483 int32_t status; in test21() local
1507 status = rte_rcu_qsbr_init(g_v, 1); in test21()
1508 TEST_LPM_ASSERT(status == 0); in test21()
1513 status = rte_lpm_rcu_qsbr_add(g_lpm, &rcu_cfg); in test21()
1514 TEST_LPM_ASSERT(status == 0); in test21()
1523 status = rte_lpm_add(g_lpm, g_ip, depth, next_hop); in test21()
1524 if (status != 0) { in test21()
1531 status = rte_lpm_delete(g_lpm, g_ip, depth); in test21()
1532 if (status != 0) { in test21()
1538 status = rte_lpm_add(g_lpm, g_ip, depth, next_hop); in test21()
1539 if (status != 0) { in test21()
1554 return (status == 0) ? PASS : -1; in test21()
1565 int status, global_status = 0; in test_lpm() local
1568 status = tests[i](); in test_lpm()
1569 if (status < 0) { in test_lpm()
1571 global_status = status; in test_lpm()