git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
app/crypto-perf: check lcore job failure
[dpdk.git]
/
examples
/
ipsec-secgw
/
sa.c
diff --git
a/examples/ipsec-secgw/sa.c
b/examples/ipsec-secgw/sa.c
index
8043ed5
..
7262cce
100644
(file)
--- a/
examples/ipsec-secgw/sa.c
+++ b/
examples/ipsec-secgw/sa.c
@@
-951,7
+951,7
@@
get_spi_proto(uint32_t spi, enum rte_security_ipsec_sa_direction dir)
if (rc6 >= 0) {
RTE_LOG(ERR, IPSEC,
"%s: SPI %u used simultaeously by "
if (rc6 >= 0) {
RTE_LOG(ERR, IPSEC,
"%s: SPI %u used simultaeously by "
- "
IPv
4(%d) and IPv6 (%d) SP rules\n",
+ "
RTE_IPV
4(%d) and IPv6 (%d) SP rules\n",
__func__, spi, rc4, rc6);
return -EINVAL;
} else
__func__, spi, rc4, rc6);
return -EINVAL;
} else
@@
-1040,7
+1040,7
@@
ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)
struct rte_ipsec_sa_prm prm;
struct rte_ipv4_hdr v4 = {
.version_ihl = IPVERSION << 4 |
struct rte_ipsec_sa_prm prm;
struct rte_ipv4_hdr v4 = {
.version_ihl = IPVERSION << 4 |
- sizeof(v4) / IPV4_IHL_MULTIPLIER,
+ sizeof(v4) /
RTE_
IPV4_IHL_MULTIPLIER,
.time_to_live = IPDEFTTL,
.next_proto_id = IPPROTO_ESP,
.src_addr = lsa->src.ip.ip4,
.time_to_live = IPDEFTTL,
.next_proto_id = IPPROTO_ESP,
.src_addr = lsa->src.ip.ip4,
@@
-1228,10
+1228,7
@@
single_inbound_lookup(struct ipsec_sa *sadb, struct rte_mbuf *pkt,
*sa_ret = NULL;
ip = rte_pktmbuf_mtod(pkt, struct ip *);
*sa_ret = NULL;
ip = rte_pktmbuf_mtod(pkt, struct ip *);
- if (ip->ip_v == IPVERSION)
- esp = (struct rte_esp_hdr *)(ip + 1);
- else
- esp = (struct rte_esp_hdr *)(((struct ip6_hdr *)ip) + 1);
+ esp = rte_pktmbuf_mtod_offset(pkt, struct rte_esp_hdr *, pkt->l3_len);
if (esp->spi == INVALID_SPI)
return;
if (esp->spi == INVALID_SPI)
return;