If GTPU Extension 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>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
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);
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,