net/ice/base: add flow director completion report option
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 15 Jun 2020 02:04:40 +0000 (10:04 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jun 2020 17:21:07 +0000 (19:21 +0200)
This patch introduces comp_report variable so that the called can
determine whether to report completion on error or on all cases.

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_fdir.c
drivers/net/ice/base/ice_fdir.h
drivers/net/ice/ice_fdir_filter.c

index 38aad19..a62e6ee 100644 (file)
@@ -703,7 +703,7 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
                ICE_FXD_FLTR_QW1_PCMD_REMOVE;
        fdir_fltr_ctx.swap = ICE_FXD_FLTR_QW1_SWAP_NOT_SET;
        fdir_fltr_ctx.comp_q = ICE_FXD_FLTR_QW0_COMP_Q_ZERO;
-       fdir_fltr_ctx.comp_report = ICE_FXD_FLTR_QW0_COMP_REPORT_SW;
+       fdir_fltr_ctx.comp_report = input->comp_report;
        fdir_fltr_ctx.fdid_prio = input->fdid_prio;
        fdir_fltr_ctx.desc_prof = 1;
        fdir_fltr_ctx.desc_prof_prio = 3;
index 2d41ec3..5b75fed 100644 (file)
@@ -204,6 +204,7 @@ struct ice_fdir_fltr {
        u16 cnt_index;
        u32 fltr_id;
        u8 fdid_prio;
+       u8 comp_report;
        /* Set to true for an ACL filter */
        bool acl_fltr;
 };
index 19fa41a..77e2da9 100644 (file)
@@ -1120,6 +1120,7 @@ ice_fdir_add_del_filter(struct ice_pf *pf,
        filter->input.dest_vsi = pf->main_vsi->idx;
 
        memset(&desc, 0, sizeof(desc));
+       filter->input.comp_report = ICE_FXD_FLTR_QW0_COMP_REPORT_SW;
        ice_fdir_get_prgm_desc(hw, &filter->input, &desc, add);
 
        is_tun = ice_fdir_is_tunnel_profile(filter->tunnel_type);