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
net: add rte prefix to IP defines
[dpdk.git]
/
examples
/
ipsec-secgw
/
sa.c
diff --git
a/examples/ipsec-secgw/sa.c
b/examples/ipsec-secgw/sa.c
index
b850e98
..
8a3d894
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 "
- "IPv4(%d) and IPv6 (%d) SP rules\n",
+ "
RTE_
IPv4(%d) and IPv6 (%d) SP rules\n",
__func__, spi, rc4, rc6);
return -EINVAL;
} else
__func__, spi, rc4, rc6);
return -EINVAL;
} else
@@
-967,7
+967,7
@@
get_spi_proto(uint32_t spi, enum rte_security_ipsec_sa_direction dir)
static int
fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss,
static int
fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, const struct ipsec_sa *ss,
- const struct
ipv4_hdr *v4, struct
ipv6_hdr *v6)
+ const struct
rte_ipv4_hdr *v4, struct rte_
ipv6_hdr *v6)
{
int32_t rc;
{
int32_t rc;
@@
-1038,15
+1038,15
@@
ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)
{
int rc;
struct rte_ipsec_sa_prm prm;
{
int rc;
struct rte_ipsec_sa_prm prm;
- struct ipv4_hdr v4 = {
+ struct
rte_
ipv4_hdr v4 = {
.version_ihl = IPVERSION << 4 |
.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,
.dst_addr = lsa->dst.ip.ip4,
};
.time_to_live = IPDEFTTL,
.next_proto_id = IPPROTO_ESP,
.src_addr = lsa->src.ip.ip4,
.dst_addr = lsa->dst.ip.ip4,
};
- struct ipv6_hdr v6 = {
+ struct
rte_
ipv6_hdr v6 = {
.vtc_flow = htonl(IP6_VERSION << 28),
.proto = IPPROTO_ESP,
};
.vtc_flow = htonl(IP6_VERSION << 28),
.proto = IPPROTO_ESP,
};
@@
-1219,7
+1219,7
@@
static inline void
single_inbound_lookup(struct ipsec_sa *sadb, struct rte_mbuf *pkt,
struct ipsec_sa **sa_ret)
{
single_inbound_lookup(struct ipsec_sa *sadb, struct rte_mbuf *pkt,
struct ipsec_sa **sa_ret)
{
- struct esp_hdr *esp;
+ struct
rte_
esp_hdr *esp;
struct ip *ip;
uint32_t *src4_addr;
uint8_t *src6_addr;
struct ip *ip;
uint32_t *src4_addr;
uint8_t *src6_addr;
@@
-1229,9
+1229,9
@@
single_inbound_lookup(struct ipsec_sa *sadb, struct rte_mbuf *pkt,
ip = rte_pktmbuf_mtod(pkt, struct ip *);
if (ip->ip_v == IPVERSION)
ip = rte_pktmbuf_mtod(pkt, struct ip *);
if (ip->ip_v == IPVERSION)
- esp = (struct esp_hdr *)(ip + 1);
+ esp = (struct
rte_
esp_hdr *)(ip + 1);
else
else
- esp = (struct esp_hdr *)(((struct ip6_hdr *)ip) + 1);
+ esp = (struct
rte_
esp_hdr *)(((struct ip6_hdr *)ip) + 1);
if (esp->spi == INVALID_SPI)
return;
if (esp->spi == INVALID_SPI)
return;