Skip to contentSkip to conversation

net/iavf: fix QFI fields of GTPU UL and DL for FDIR

PATCH Superseded Lingyu Liu 2 participants 3 messages Sep 1, 2021 – Sep 22, 2021 Network drivers

lore
Share & tools
lore

Lingyu Liu

author
#0 lore raw

PATCH 1/1 net/iavf: fix QFI fields of GTPU UL and DL for FDIR

Fix QFI fields matching of GTPU UL/DL for FDIR.

Fixes 78e8a87f6324 ("net/iavf: fix GTPU UL and DL support for flow director")
---
 drivers/net/iavf/iavf_fdir.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_fdir.c +6 -1
index 32b06044f2..134f887965 100644
@@ -1171,7 +1171,12 @@ 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;
-					VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, GTPU_EH, QFI);
+					if (gtp_psc_spec->pdu_type == IAVF_GTPU_EH_UPLINK)
+						VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, GTPU_UP, QFI);
+					else if (gtp_psc_spec->pdu_type == 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,
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v2 1/1 net/iavf: fix QFI fields of GTPU UL and DL for FDIR

Fix QFI fields matching of GTPU UL/DL for FDIR.

Fixes 78e8a87f6324 ("net/iavf: fix GTPU UL and DL support for flow director")

---
V2:
* Fix coding style issue

---
 drivers/net/iavf/iavf_fdir.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_fdir.c +11 -1
index 32b06044f2..560589a496 100644
@@ -1171,7 +1171,17 @@ 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;
-					VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, GTPU_EH, QFI);
+					if (gtp_psc_spec->pdu_type ==
+								IAVF_GTPU_EH_UPLINK)
+						VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
+										 GTPU_UP, QFI);
+					else if (gtp_psc_spec->pdu_type ==
+								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,
Signature · 1 line
2.25.1
Acked-by on v2 1/1 Applied
#2 lore raw
Quoted 11 lines

-----Original Message-----
From: Liu, Lingyu <[email protected]>
Sent: Monday, September 13, 2021 11:34 PM
To: [email protected]; Zhang, Qi Z <[email protected]>; Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>
Cc: Liu, Lingyu <[email protected]>; [email protected]; Guo, Junfeng <[email protected]>
Subject: [PATCH v2] net/iavf: fix QFI fields of GTPU UL and DL for FDIR

Quoted 6 lines

Fix QFI fields matching of GTPU UL/DL for FDIR.

Fixes 78e8a87f6324 ("net/iavf: fix GTPU UL and DL support for flow director")

Applied to dpdk-next-net-intel.

Thanks
Qi