app/testpmd: fix GTP L2 len in checksum engine
PATCH 1/1 app/testpmd: fix GTP L2 len in checksum engine
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.
--- app/test-pmd/csumonly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/csumonly.c +1 -1
@@ -250,7 +250,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 */
Signature · 1 line
2.25.1
Quoted 6 lines · Raslan Darawsheh
GTP header can be followed by an optional 32 bits extension.
But,
l2_lenvalue statically set toRTE_ETHER_GTP_HLENwhich is defined to be
(sizeof(struct rte_udp_hdr)+sizeof(struct rte_gtp_hdr))
Quoted 7 lines
This fixes the
l2_lento take into consideration the extension size.Fixes d8e5e69f3a9b ("app/testpmd: add GTP parsing and Tx checksum offload")Signed-off-by Raslan Darawsheh <[email protected]>
Quoted 9 lines
--- app/test-pmd/csumonly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)app/test-pmd/csumonly.c +0
-0
app/test-pmd/csumonly.c parse_gtp(struct rte_udp_hdr *udp_hdr, · line 253
Quoted 5 lines
app/test-pmd/csumonly.c +1
-1@@ -250,7 +250,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);
Macro is unused after above change.
So can be removed.
Quoted 3 lines
app/test-pmd/csumonly.c +0
-0}/* Parse a vxlan header */
Ferruh Yigit
AppliedQuoted 10 lines · Aman Deep
Quoted 8 lines · Raslan Darawsheh
GTP header can be followed by an optional 32 bits extension.
But,
l2_lenvalue statically set toRTE_ETHER_GTP_HLENwhich is defined to be
(sizeof(struct rte_udp_hdr)+sizeof(struct rte_gtp_hdr))This fixes the
l2_lento take into consideration the extension size.
Quoted 8 lines
Quoted 6 lines
Fixes d8e5e69f3a9b ("app/testpmd: add GTP parsing and Tx checksumoffload")
Cc: [email protected]
Cc: [email protected]Signed-off-by Raslan Darawsheh <[email protected]>Acked-by Aman Singh <[email protected]>>
Applied to dpdk-next-net/main, thanks.