Skip to contentSkip to conversation

net/iavf: fix refine protocol header error

PATCH Applied Steve Yang 2 participants 2 messages Oct 31, 2022 – Nov 1, 2022 Network drivers

lore
Share & tools
lore

Steve Yang

author
#0 lore raw

PATCH 1/1 net/iavf: fix refine protocol header error

Protocol header count should be changed when tunnel level is larger than 1.

Fixes 13a7dcddd8ee ("net/iavf: fix taninted scalar")
---
 drivers/net/iavf/iavf_hash.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_hash.c +2 -1
index 71c80d2c75..67b05313eb 100644
@@ -1210,7 +1210,7 @@ iavf_refine_proto_hdrs_by_pattern(struct virtchnl_proto_hdrs *proto_hdrs,
 	struct virtchnl_proto_hdr *hdr2;
 	int i, shift_count = 1;
 	int tun_lvl = proto_hdrs->tunnel_level;
-	int phdrs_count = proto_hdrs->count;
+	int phdrs_count = 0;
 
 	if (!(phint & IAVF_PHINT_GTPU_MSK) && !(phint & IAVF_PHINT_GRE))
 		return;
@@ -1219,6 +1219,7 @@ iavf_refine_proto_hdrs_by_pattern(struct virtchnl_proto_hdrs *proto_hdrs,
 		if (phint & IAVF_PHINT_LAYERS_MSK)
 			shift_count = 2;
 
+		phdrs_count = proto_hdrs->count;
 		/* shift headers layer */
 		for (i = phdrs_count - 1 + shift_count;
 		     i > shift_count - 1; i--) {
Signature · 1 line
2.25.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: Steve Yang <[email protected]>
Sent: Monday, October 31, 2022 2:43 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Yang, SteveX <[email protected]>
Subject: [PATCH v1] net/iavf: fix refine protocol header error

Quoted 5 lines

Protocol header count should be changed when tunnel level is larger than 1.

Fixes 13a7dcddd8ee ("net/iavf: fix taninted scalar")

Applied to dpdk-next-net-intel.

Thanks
Qi