From: Sunil Kumar Kori <sk...@marvell.com>

hdr_lens is used to maintain header lengths after parsing packets.
When port receives different type of packets (say first is VXLAN
packet and second is GRE packet).

For first packet, L2/L3/L4 lengths are set for inner and outer header
alongwith tunnel_len.

Now for second packet, tunnel_len is added more than its size it
contains stale value which further leads to wrong header pointers.

Hence clearing stale information before processing each packet.

Signed-off-by: Sunil Kumar Kori <sk...@marvell.com>
---
 app/test-pmd/csumonly.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index fa0002d321..4d02d622d6 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -670,6 +670,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
                        rte_prefetch0(rte_pktmbuf_mtod(pkts_burst[i + 1],
                                                       void *));
 
+               memset(&hdr_lens, 0, sizeof(struct rte_net_hdr_lens));
                m = pkts_burst[i];
                info.is_tunnel = 0;
                info.pkt_len = rte_pktmbuf_pkt_len(m);
-- 
2.43.0

Reply via email to