[2/2] examples/ipsec-secgw: fix issue with IP hdr manipulation

Message ID 20220721153132.3570-2-ndabilpuram@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [1/2] examples/ipsec-secgw: use Tx cksum offload conditionally |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing fail Testing issues
ci/iol-aarch64-compile-testing fail Testing issues
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Nithin Dabilpuram July 21, 2022, 3:31 p.m. UTC
  Fix issue with ip header pointer computation to pick the right offset.

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

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

Comments

Akhil Goyal Aug. 25, 2022, 8:13 a.m. UTC | #1
> Subject: [PATCH 2/2] examples/ipsec-secgw: fix issue with IP hdr manipulation
Title should be 
examples/ipsec-secgw: fix IP header manipulation

Will fix while applying.

> 
> Fix issue with ip header pointer computation to pick the right offset.
> 
> Fixes: 6eb3ba03995c ("examples/ipsec-secgw: support poll mode NEON LPM
> lookup")
> Cc: rbhansali@marvell.com
> 
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
  

Patch

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 */