examples/ipsec-secgw: update mbuf packet type
PATCH 1/1 examples/ipsec-secgw: update mbuf packet type
Packet_type should be updated to remove/add L4 type for encrypted/decrypted packet
--- examples/ipsec-secgw/ipip.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
examples/ipsec-secgw/ipip.h +6 -1
@@ -103,7 +103,7 @@ ipip_outbound(struct rte_mbuf *m, uint32_t offset, uint32_t is_ipv6, outip4->ip_src.s_addr = src->ip.ip4; outip4->ip_dst.s_addr = dst->ip.ip4; - + m->packet_type &= ~RTE_PTYPE_L4_MASK ;return outip4; }
@@ -169,6 +169,11 @@ ipip_inbound(struct rte_mbuf *m, uint32_t offset)ip4_ecn_setup (inip4);/* XXX This should be done by the forwarding engine instead */ inip4->ip_ttl -=1 ; + m->packet_type &= ~RTE_PTYPE_L4_MASK ; +if (inip4->ip_p ==IPPROTO_UDP ) + m->packet_type |=RTE_PTYPE_L4_UDP ; +else if (inip4->ip_p ==IPPROTO_TCP ) + m->packet_type |=RTE_PTYPE_L4_TCP ; }else { inip6 = (struct ip6_hdr *)inip4;if (set_ecn)
Signature · 1 line
2.9.3
Quoted 11 lines
-----Original Message-----
From: Akhil Goyal [mailto:[email protected]]
Sent: Thursday, December 14, 2017 7:06 AM
To: [email protected]
Cc: De Lara Guarch, Pablo <[email protected]>; [email protected]; Gonzalez Monroy, Sergio <[email protected]>; Nicolau, Radu <[email protected]>; Akhil Goyal <[email protected]>
Subject: [PATCH] examples/ipsec-secgw: update mbuf packet type
Quoted 5 lines
Packet_typeshould be updated to remove/add L4 type for encrypted/decrypted packetSigned-off-by Akhil Goyal <[email protected]>---
De Lara Guarch, Pablo
AppliedQuoted 22 lines
-----Original Message-----
From: Nicolau, Radu
Sent: Tuesday, January 16, 2018 4:12 PM
To: Akhil Goyal <[email protected]>; [email protected]
Cc: De Lara Guarch, Pablo <[email protected]>; [email protected]; Gonzalez Monroy, Sergio <[email protected]>
Subject: RE: [PATCH] examples/ipsec-secgw: update mbuf packet typeQuoted 10 lines
-----Original Message-----
From: Akhil Goyal [mailto:[email protected]]
Sent: Thursday, December 14, 2017 7:06 AM
To: [email protected]
Cc: De Lara Guarch, Pablo <[email protected]>; [email protected]; Gonzalez Monroy, Sergio <[email protected]>; Nicolau, Radu <[email protected]>; Akhil Goyal <[email protected]>
Subject: [PATCH] examples/ipsec-secgw: update mbuf packet type
Quoted 6 lines
Quoted 5 lines
Packet_typeshould be updated to remove/add L4 type for encrypted/decrypted packetSigned-off-by Akhil Goyal <[email protected]>---
Acked-by Radu Nicolau <[email protected]>
Applied to dpdk-next-crypto.
Thanks,
Pablo