Fix issue with ip header pointer computation to pick the right offset.

Fixes: 6eb3ba03995c ("examples/ipsec-secgw: support poll mode NEON LPM lookup")
Cc: rbhans...@marvell.com

Signed-off-by: Nithin Dabilpuram <ndabilpu...@marvell.com>
---
 examples/ipsec-secgw/ipsec_neon.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec_neon.h 
b/examples/ipsec-secgw/ipsec_neon.h
index 3f2d0a0..f6ba287 100644
--- a/examples/ipsec-secgw/ipsec_neon.h
+++ b/examples/ipsec-secgw/ipsec_neon.h
@@ -47,7 +47,7 @@ processx4_step3(struct rte_mbuf *pkts[FWDSTEP], uint16_t 
dst_port[FWDSTEP],
                        pkt->ol_flags |= tx_offloads;
 
                        ip = (struct rte_ipv4_hdr *)
-                               (p[i] + RTE_ETHER_HDR_LEN + 1);
+                               (((uintptr_t)p[i]) + RTE_ETHER_HDR_LEN);
                        ip->hdr_checksum = 0;
 
                        /* calculate IPv4 cksum in SW */
-- 
2.8.4

Reply via email to