X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fipsec-secgw%2Fsad.h;h=473aaa938ec67fbc05c84f3175f09c9a77f874c1;hb=d52e042850147c861f31adb04ad8a65820971117;hp=3f92db24d5c9391d210cb77340f9a1c83187ee68;hpb=2cf67788ae895b4e3c05059e1feb06f6d3d8865e;p=dpdk.git diff --git a/examples/ipsec-secgw/sad.h b/examples/ipsec-secgw/sad.h index 3f92db24d5..473aaa938e 100644 --- a/examples/ipsec-secgw/sad.h +++ b/examples/ipsec-secgw/sad.h @@ -18,11 +18,6 @@ struct ipsec_sad_cache { 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); @@ -93,7 +88,7 @@ sad_lookup(struct ipsec_sad *sad, struct rte_mbuf *pkts[], 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);