net/ice/base: support flow director for GTPU UL/DL with QFI
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 10 Aug 2021 02:51:37 +0000 (10:51 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 11 Aug 2021 02:25:21 +0000 (04:25 +0200)
Enable Flow Director filtering for GTPU UL/DL QFI field matching.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
drivers/net/ice/base/ice_flow.c
drivers/net/ice/base/ice_flow.h

index 4705483..96d54b4 100644 (file)
@@ -185,9 +185,15 @@ struct ice_flow_field_info ice_flds_info[ICE_FLOW_FIELD_IDX_MAX] = {
        /* ICE_FLOW_FIELD_IDX_GTPU_UP_TEID */
        ICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_GTPU_UP, 12,
                          ICE_FLOW_FLD_SZ_GTP_TEID),
+       /* ICE_FLOW_FIELD_IDX_GTPU_UP_QFI */
+       ICE_FLOW_FLD_INFO_MSK(ICE_FLOW_SEG_HDR_GTPU_UP, 22,
+                             ICE_FLOW_FLD_SZ_GTP_QFI, 0x3f00),
        /* ICE_FLOW_FIELD_IDX_GTPU_DWN_TEID */
        ICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_GTPU_DWN, 12,
                          ICE_FLOW_FLD_SZ_GTP_TEID),
+       /* ICE_FLOW_FIELD_IDX_GTPU_DWN_QFI */
+       ICE_FLOW_FLD_INFO_MSK(ICE_FLOW_SEG_HDR_GTPU_DWN, 22,
+                             ICE_FLOW_FLD_SZ_GTP_QFI, 0x3f00),
        /* PPPOE */
        /* ICE_FLOW_FIELD_IDX_PPPOE_SESS_ID */
        ICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_PPPOE, 2,
@@ -1473,6 +1479,8 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
        case ICE_FLOW_FIELD_IDX_GTPU_DWN_TEID:
        case ICE_FLOW_FIELD_IDX_GTPU_EH_TEID:
        case ICE_FLOW_FIELD_IDX_GTPU_EH_QFI:
+       case ICE_FLOW_FIELD_IDX_GTPU_UP_QFI:
+       case ICE_FLOW_FIELD_IDX_GTPU_DWN_QFI:
                /* GTP is accessed through UDP OF protocol */
                prot_id = ICE_PROT_UDP_OF;
                break;
index 92beb75..371d960 100644 (file)
@@ -268,8 +268,10 @@ enum ice_flow_field {
        ICE_FLOW_FIELD_IDX_GTPU_EH_QFI,
        /* GTPU_UP */
        ICE_FLOW_FIELD_IDX_GTPU_UP_TEID,
+       ICE_FLOW_FIELD_IDX_GTPU_UP_QFI,
        /* GTPU_DWN */
        ICE_FLOW_FIELD_IDX_GTPU_DWN_TEID,
+       ICE_FLOW_FIELD_IDX_GTPU_DWN_QFI,
        /* PPPOE */
        ICE_FLOW_FIELD_IDX_PPPOE_SESS_ID,
        /* PFCP */