Skip to contentSkip to conversation

net/iavf: fix QFI field bit check for GTPU EH

PATCH Superseded Junfeng Guo 3 participants 6 messages Sep 29, 2021 – Oct 8, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: fix QFI field bit check for GTPU EH

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")
---
 drivers/net/iavf/iavf_fdir.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/net/iavf/iavf_fdir.c +5 -7
index 560589a496..227a089ce0 100644
@@ -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,
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/1 net/iavf: fix QFI field bit check for GTPU EH

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, for 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")
---
 drivers/net/iavf/iavf_fdir.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/net/iavf/iavf_fdir.c +5 -7
index 560589a496..227a089ce0 100644
@@ -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,
Signature · 1 line
2.25.1
Acked-by Ferruh Yigit on v2 1/1
#2 lore raw
Quoted 15 lines

-----Original Message-----
From: Guo, Junfeng <[email protected]>
Sent: Wednesday, September 29, 2021 8:32 PM
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; [email protected]; Yigit, Ferruh <[email protected]>; Guo, Junfeng <[email protected]>; Liu, Lingyu <[email protected]>
Subject: [PATCH v2] net/iavf: fix QFI field bit check for GTPU EH

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, for this case, we should check gtp_psc_mask->pdu_type instead, to set QFI field bit of GTPU_EH first.

Quoted 4 lines
Fixes 45cc3a5435fc ("net/iavf: fix QFI fields of GTPU UL/DL for FDIR")

The patch can't be applied due to below commit

commit 16b8e92d49b87705fffbedd9c3241204d9a584a6

Author: Raslan Darawsheh <[email protected]>
Date:   Mon Aug 23 13:55:39 2021 +0300

ethdev: use extension header for GTP PSC item

This updates the gtp_psc flow item to use the net header definition of the gtp_psc to be based on RFC 38415-g30

Could you rebase?

Thanks
Qi

Quoted 36 lines
---
 drivers/net/iavf/iavf_fdir.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/net/iavf/iavf_fdir.c index renamed from drivers/net/iavf/iavf_fdir.c +0 -0

560589a496..227a089ce0 100644

drivers/net/iavf/iavf_fdir.c +5 -7
@@ -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);
drivers/net/iavf/iavf_fdir.c +0 -1
 				}
 
 				rte_memcpy(hdr->buffer, gtp_psc_spec,
--

2.25.1

#3 lore raw

PATCH v3 1/1 net/iavf: fix QFI field bit check for GTPU EH

In reply to Junfeng Guo

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")
---
 drivers/net/iavf/iavf_fdir.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/iavf/iavf_fdir.c +4 -4
index ea2b692712..ea99806330 100644
@@ -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,
Signature · 1 line
2.25.1
Acked-by on v3 1/1 Applied
#4 lore raw
Quoted 16 lines

-----Original Message-----
From: Guo, Junfeng <[email protected]>
Sent: Friday, October 8, 2021 6:42 PM
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Guo, Junfeng <[email protected]>; [email protected]
Subject: [PATCH v3] net/iavf: fix QFI field bit check for GTPU EH

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.

Quoted 4 lines
Fixes cd212c466992 ("net/iavf: fix QFI fields of GTPU UL/DL for flow director")

Applied to dpdk-next-net-intel.

Thanks
Qi

#5 lore raw
Quoted 10 lines · Qi Z
Quoted 10 lines

-----Original Message-----
From: Guo, Junfeng <[email protected]>
Sent: Friday, October 8, 2021 6:42 PM
To: Zhang, Qi Z <[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Guo, Junfeng <[email protected]>; [email protected]
Subject: [PATCH v3] net/iavf: fix QFI field bit check for GTPU EH

If GTPU Extionsion header has no pdu_type setting, the parsed value of

extension.

Quoted 5 lines
Quoted 5 lines

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

This patch fixes a 3 weeks old patch that was itself fixing.

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

flow director")

I hope all tests are now fine.

Quoted 7 lines
Quoted 3 lines

Applied to dpdk-next-net-intel.

Signature · 1 line
David Marchand