DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wenjun Wu <wenjun1.wu@intel.com>
To: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com
Cc: Wenjun Wu <wenjun1.wu@intel.com>
Subject: [dpdk-dev] [PATCH v2] net/iavf: fix wrong FDIR L3 field set for IPv4 fragment packets
Date: Tue, 17 Aug 2021 14:49:55 +0800	[thread overview]
Message-ID: <20210817064955.160102-1-wenjun1.wu@intel.com> (raw)
In-Reply-To: <20210802075754.952979-1-wenjun1.wu@intel.com>

Originally, the value of field_selector for IPV4_FRAG header hdr1 is
the same as the previous header hdr2. For IPv4 packets, field_selector
for hdr2 can be any value between 0 and 4, depending on the selected
field. Actually, this value for IPV4_FRAG should be constant 0,
which denotes the field packet ID.

This patch adds an assignment to hdr1->field_selector to make sure that
it is always 0.

Fixes: 3334513ef484 ("net/iavf: support flow director for IP fragment")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>

---
v2: reword commit log
---
 drivers/net/iavf/iavf_fdir.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index 2869a8b424..32b06044f2 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -664,6 +664,7 @@ iavf_fdir_add_fragment_hdr(struct virtchnl_proto_hdrs *hdrs, int layer)
 	/* adding dummy fragment header */
 	hdr1 = &hdrs->proto_hdr[layer];
 	VIRTCHNL_SET_PROTO_HDR_TYPE(hdr1, IPV4_FRAG);
+	hdr1->field_selector = 0;
 	hdrs->count = ++layer;
 }
 
-- 
2.25.1


  parent reply	other threads:[~2021-08-17  7:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02  7:57 [dpdk-dev] [PATCH] net/iavf: support FDIR L3 fields for IP " Wenjun Wu
2021-08-10  7:42 ` Zhang, Qi Z
2021-08-13 13:59 ` Ferruh Yigit
2021-08-17  6:35   ` Wu, Wenjun1
2021-08-17  6:49 ` Wenjun Wu [this message]
2021-08-29 11:18   ` [dpdk-dev] [PATCH v2] net/iavf: fix wrong FDIR L3 field set for IPv4 " Zhang, Qi Z
2021-08-17  6:50 ` [dpdk-dev] [PATCH v2] net/iavf: support FDIR L3 fields for IPv6 " Wenjun Wu
2021-08-29 11:21   ` 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=20210817064955.160102-1-wenjun1.wu@intel.com \
    --to=wenjun1.wu@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).