From 75a452410f544c5fd459c5d0f68023ae108cdc34 Mon Sep 17 00:00:00 2001 From: Raslan Darawsheh Date: Sun, 2 Apr 2023 15:26:19 +0300 Subject: [PATCH] app/testpmd: fix GTP L2 length in checksum engine [ upstream commit dd827fa42a30a9b0aa87a1d5614af83ea32b19e0 ] GTP header can be followed by an optional 32 bits extension. But, l2_len value statically set to RTE_ETHER_GTP_HLEN which is defined to be (sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr)) This fixes the l2_len to take into consideration the extension size. Fixes: d8e5e69f3a9b ("app/testpmd: add GTP parsing and Tx checksum offload") Signed-off-by: Raslan Darawsheh Acked-by: Aman Singh --- 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 7a91fcb63f..9b12b91ead 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -246,7 +246,7 @@ parse_gtp(struct rte_udp_hdr *udp_hdr, info->l4_proto = 0; } - info->l2_len += RTE_ETHER_GTP_HLEN; + info->l2_len += gtp_len + sizeof(udp_hdr); } /* Parse a vxlan header */