net/ice/base: enable setting up FDIR counters
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 23 Sep 2019 07:44:32 +0000 (15:44 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:56 +0000 (15:00 +0200)
Enable getting value from input to set up flow director counters,
so that the FDIR counters can count none, packets only, bytes only
or both packets and bytes as demanded.

Signed-off-by: Junfeng Guo <junfeng.guo@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

index 4632f1a..1c455ff 100644 (file)
@@ -349,7 +349,7 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
                fdir_fltr_ctx.drop = ICE_FXD_FLTR_QW0_DROP_NO;
                fdir_fltr_ctx.qindex = input->q_index;
        }
-       fdir_fltr_ctx.cnt_ena = ICE_FXD_FLTR_QW0_STAT_ENA_PKTS;
+       fdir_fltr_ctx.cnt_ena = input->cnt_ena;
        fdir_fltr_ctx.cnt_index = input->cnt_index;
        fdir_fltr_ctx.fd_vsi = ice_get_hw_vsi_num(hw, input->dest_vsi);
        fdir_fltr_ctx.evict_ena = ICE_FXD_FLTR_QW0_EVICT_ENA_FALSE;
index ccfc30c..007f6dd 100644 (file)
@@ -176,6 +176,7 @@ struct ice_fdir_fltr {
        u16 q_index;
        u16 dest_vsi;
        u8 dest_ctl;
+       u8 cnt_ena;
        u8 fltr_status;
        u16 cnt_index;
        u32 fltr_id;