[PATCH] app/testpmd: fix 32-bit system forwarding failure

Shiyang He shiyangx.he at intel.com
Thu Jun 29 12:09:55 CEST 2023


l2_len is not calculated correctly on 32-bit systems, resulting in
packet forwarding failure.

This patch fixes this issue by changing the l2_len calculation.

Fixes: dd827fa42a30 ("app/testpmd: fix GTP L2 length in checksum engine")
Cc: stable at dpdk.org

Signed-off-by: Shiyang He <shiyangx.he at intel.com>
---
 app/test-pmd/csumonly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 7af635e3f7..c103e54111 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -250,7 +250,7 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,
 		info->l4_proto = 0;
 	}
 
-	info->l2_len += gtp_len + sizeof(udp_hdr);
+	info->l2_len += gtp_len + sizeof(*udp_hdr);
 }
 
 /* Parse a vxlan header */
-- 
2.37.2



More information about the stable mailing list