Skip to content

Commit

Permalink
app/testpmd: fix GTP L2 length in checksum engine
Browse files Browse the repository at this point in the history
[ 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: d8e5e69 ("app/testpmd: add GTP parsing and Tx checksum offload")

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
  • Loading branch information
raslandarawsheh authored and bluca committed Jun 14, 2023
1 parent 076bdbf commit 75a4524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/test-pmd/csumonly.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 75a4524

Please sign in to comment.