DPDK patches and discussions
 help / color / mirror / Atom feed
From: Steve Yang <stevex.yang@intel.com>
To: dev@dpdk.org
Cc: jingjing.wu@intel.com, beilei.xing@intel.com,
	Steve Yang <stevex.yang@intel.com>
Subject: [PATCH v1] net/iavf: fix refine protocol header error
Date: Mon, 31 Oct 2022 06:42:33 +0000	[thread overview]
Message-ID: <20221031064233.256917-1-stevex.yang@intel.com> (raw)

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(-)

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--) {
-- 
2.25.1


             reply	other threads:[~2022-10-31  6:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31  6:42 Steve Yang [this message]
2022-11-01  3:01 ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221031064233.256917-1-stevex.yang@intel.com \
    --to=stevex.yang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).