RTE_DECLARE_PER_LCORE(struct ipsec_sad_cache, sad_cache);
-struct ipsec_sad {
- struct rte_ipsec_sad *sad_v4;
- struct rte_ipsec_sad *sad_v6;
-};
-
int ipsec_sad_create(const char *name, struct ipsec_sad *sad,
int socket_id, struct ipsec_sa_cnt *sa_cnt);
esp = rte_pktmbuf_mtod_offset(pkts[i], struct rte_esp_hdr *,
pkts[i]->l3_len);
- is_ipv4 = ((ipv4->version_ihl >> 4) == IPVERSION);
+ is_ipv4 = pkts[i]->packet_type & RTE_PTYPE_L3_IPV4;
spi = rte_be_to_cpu_32(esp->spi);
cache_idx = SPI2IDX(spi, cache->mask);