MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_lookup_basic

Function test_lookup_basic

dpdk/app/test/test_ipsec_sad.c:402–422  ·  view source on GitHub ↗

* Lookup missing key, then add it as RTE_IPSEC_SAD_SPI_ONLY, lookup it again, * lookup different key with the same SPI, then delete it and repeat lookup */

Source from the content-addressed store, hash-verified

400 * lookup different key with the same SPI, then delete it and repeat lookup
401 */
402int32_t
403test_lookup_basic(void)
404{
405 int status;
406 struct rte_ipsec_sadv4_key tuple_v4 = {SPI, DIP, SIP};
407 struct rte_ipsec_sadv4_key tuple_v4_1 = {SPI, BAD, BAD};
408 struct rte_ipsec_sadv6_key tuple_v6 = {SPI, {0xbe, 0xef, },
409 {0xf0, 0x0d, } };
410 struct rte_ipsec_sadv6_key tuple_v6_1 = {SPI, {0x0b, 0xad, },
411 {0x0b, 0xad, } };
412
413 status = __test_lookup_basic(0, (union rte_ipsec_sad_key *)&tuple_v4,
414 (union rte_ipsec_sad_key *)&tuple_v4_1);
415 if (status != TEST_SUCCESS)
416 return status;
417
418 status = __test_lookup_basic(1, (union rte_ipsec_sad_key *)&tuple_v6,
419 (union rte_ipsec_sad_key *)&tuple_v6_1);
420
421 return status;
422}
423
424static int32_t
425__test_lookup_adv(int ipv6, union rte_ipsec_sad_key *tuple,

Callers

nothing calls this directly

Calls 1

__test_lookup_basicFunction · 0.85

Tested by

no test coverage detected