[dpdk-dev] [PATCH v3] net/iavf: fix QFI field bit check for GTPU EH
Junfeng Guo
junfeng.guo at intel.com
Fri Oct 8 12:41:43 CEST 2021
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 at dpdk.org
Signed-off-by: Junfeng Guo <junfeng.guo at 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
More information about the dev
mailing list