* Check an order of add and delete */
| 844 | * Check an order of add and delete |
| 845 | */ |
| 846 | int32_t |
| 847 | test_lookup_order(void) |
| 848 | { |
| 849 | int status; |
| 850 | /* key to install*/ |
| 851 | struct rte_ipsec_sadv4_key tuple_v4 = {SPI, DIP, SIP}; |
| 852 | struct rte_ipsec_sadv4_key tuple_v4_1 = {SPI, DIP, BAD}; |
| 853 | struct rte_ipsec_sadv4_key tuple_v4_2 = {SPI, BAD, SIP}; |
| 854 | /* key to install*/ |
| 855 | struct rte_ipsec_sadv6_key tuple_v6 = {SPI, {0xbe, 0xef, }, |
| 856 | {0xf0, 0x0d, } }; |
| 857 | struct rte_ipsec_sadv6_key tuple_v6_1 = {SPI, {0xbe, 0xef, }, |
| 858 | {0x0b, 0xad, } }; |
| 859 | struct rte_ipsec_sadv6_key tuple_v6_2 = {SPI, {0x0b, 0xad, }, |
| 860 | {0xf0, 0x0d, } }; |
| 861 | |
| 862 | status = __test_lookup_order(0, (union rte_ipsec_sad_key *)&tuple_v4, |
| 863 | (union rte_ipsec_sad_key *)&tuple_v4_1, |
| 864 | (union rte_ipsec_sad_key *)&tuple_v4_2); |
| 865 | if (status != TEST_SUCCESS) |
| 866 | return status; |
| 867 | |
| 868 | status = __test_lookup_order(1, (union rte_ipsec_sad_key *)&tuple_v6, |
| 869 | (union rte_ipsec_sad_key *)&tuple_v6_1, |
| 870 | (union rte_ipsec_sad_key *)&tuple_v6_2); |
| 871 | return status; |
| 872 | } |
| 873 | |
| 874 | static struct unit_test_suite ipsec_sad_tests = { |
| 875 | .suite_name = "ipsec sad autotest", |
nothing calls this directly
no test coverage detected