[v1] net/iavf: fix refine protocol header error

Message ID 20221031064233.256917-1-stevex.yang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v1] net/iavf: fix refine protocol header error |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance fail Performance Testing issues
ci/github-robot: build fail github build: failed
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS

Commit Message

Steve Yang Oct. 31, 2022, 6:42 a.m. UTC
  Protocol header count should be changed when tunnel level is larger than 1.

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

Signed-off-by: Steve Yang <stevex.yang@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Qi Zhang Nov. 1, 2022, 3:01 a.m. UTC | #1
> -----Original Message-----
> From: Steve Yang <stevex.yang@intel.com>
> Sent: Monday, October 31, 2022 2:43 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Yang, SteveX <stevex.yang@intel.com>
> Subject: [PATCH v1] 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")
> 
> Signed-off-by: Steve Yang <stevex.yang@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 71c80d2c75..67b05313eb 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -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--) {