patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Junfeng Guo <junfeng.guo@intel.com>
To: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, ferruh.yigit@intel.com, junfeng.guo@intel.com,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH v3] net/iavf: fix QFI field bit check for GTPU EH
Date: Fri,  8 Oct 2021 10:41:43 +0000
Message-ID: <20211008104143.236289-1-junfeng.guo@intel.com> (raw)
In-Reply-To: <20210929123134.1465507-1-junfeng.guo@intel.com>

If GTPU Extionsion header has no pdu_type setting, the parsed value of
gtp_psc_spec->hdr.type will be 0, which is same as IAVF_GTPU_EH_DWLINK.
Thus, for this case, we should check gtp_psc_mask->hdr.type instead,
to set QFI field bit of GTPU_EH first.

Fixes: cd212c466992 ("net/iavf: fix QFI fields of GTPU UL/DL for flow director")
Cc: stable@dpdk.org

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/iavf/iavf_fdir.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index ea2b692712..ea99806330 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -1172,7 +1172,10 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
 			if (gtp_psc_spec && gtp_psc_mask) {
 				if (gtp_psc_mask->hdr.qfi == 0x3F) {
 					input_set |= IAVF_INSET_GTPU_QFI;
-					if (gtp_psc_spec->hdr.type ==
+					if (!gtp_psc_mask->hdr.type)
+						VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
+										 GTPU_EH, QFI);
+					else if (gtp_psc_spec->hdr.type ==
 								IAVF_GTPU_EH_UPLINK)
 						VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
 										 GTPU_UP, QFI);
@@ -1180,9 +1183,6 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
 								IAVF_GTPU_EH_DWLINK)
 						VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
 										 GTPU_DWN, QFI);
-					else
-						VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
-										 GTPU_EH, QFI);
 				}
 
 				rte_memcpy(hdr->buffer, gtp_psc_spec,
-- 
2.25.1


  parent reply	other threads:[~2021-10-08  2:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 11:13 [dpdk-stable] [PATCH] " Junfeng Guo
2021-09-29 12:31 ` [dpdk-stable] [PATCH v2] " Junfeng Guo
2021-10-07  4:24   ` Zhang, Qi Z
2021-10-08 10:41   ` Junfeng Guo [this message]
2021-10-08  6:09     ` [dpdk-stable] [PATCH v3] " Zhang, Qi Z
2021-10-08 11:01       ` David Marchand

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=20211008104143.236289-1-junfeng.guo@intel.com \
    --to=junfeng.guo@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git