patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/iavf: fix QFI field bit check for GTPU EH
@ 2021-09-29 11:13 Junfeng Guo
  2021-09-29 12:31 ` [dpdk-stable] [PATCH v2] " Junfeng Guo
  0 siblings, 1 reply; 6+ messages in thread
From: Junfeng Guo @ 2021-09-29 11:13 UTC (permalink / raw)
  To: qi.z.zhang, jingjing.wu, beilei.xing
  Cc: dev, stable, ferruh.yigit, junfeng.guo, lingyu.liu

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

Fixes: 45cc3a5435fc ("net/iavf: fix QFI fields of GTPU UL/DL for FDIR")
Cc: stable@dpdk.org

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

diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c
index 560589a496..227a089ce0 100644
--- a/drivers/net/iavf/iavf_fdir.c
+++ b/drivers/net/iavf/iavf_fdir.c
@@ -1171,17 +1171,15 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
 			if (gtp_psc_spec && gtp_psc_mask) {
 				if (gtp_psc_mask->qfi == UINT8_MAX) {
 					input_set |= IAVF_INSET_GTPU_QFI;
-					if (gtp_psc_spec->pdu_type ==
-								IAVF_GTPU_EH_UPLINK)
+					if (!gtp_psc_mask->pdu_type)
 						VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
-										 GTPU_UP, QFI);
-					else if (gtp_psc_spec->pdu_type ==
-								IAVF_GTPU_EH_DWLINK)
+										 GTPU_EH, QFI);
+					else if (gtp_psc_spec->pdu_type == IAVF_GTPU_EH_DWLINK)
 						VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
 										 GTPU_DWN, QFI);
-					else
+					else if (gtp_psc_spec->pdu_type == IAVF_GTPU_EH_UPLINK)
 						VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
-										 GTPU_EH, QFI);
+										 GTPU_UP, QFI);
 				}
 
 				rte_memcpy(hdr->buffer, gtp_psc_spec,
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-08 11:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 11:13 [dpdk-stable] [PATCH] net/iavf: fix QFI field bit check for GTPU EH 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   ` [dpdk-stable] [PATCH v3] " Junfeng Guo
2021-10-08  6:09     ` Zhang, Qi Z
2021-10-08 11:01       ` David Marchand

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