ice: Reset FDIR counter in FDIR init stage
Subsystems (2)
PATCH v3 1/1 ice: Reset FDIR counter in FDIR init stage
Reset the FDIR counters when FDIR inits. Without this patch, when VF initializes or resets, all the FDIR counters are not cleaned, which may cause unexpected behaviors for future FDIR rule create (e.g., rule conflict).
---
v2: change commit message to apply more to a kernel use
v3: simplify commit message
--- .../net/ethernet/intel/ice/ice_virtchnl_fdir.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c +16 -0
@@ -541,6 +541,21 @@ static void ice_vc_fdir_rem_prof_all(struct ice_vf *vf) } } +/** +* ice_vc_fdir_reset_cnt_all - reset all FDIR counters for this VF FDIR +* @fdir: pointer to the VF FDIR structure +*/ +static void ice_vc_fdir_reset_cnt_all (struct ice_vf_fdir *fdir) +{ +enum ice_fltr_ptype flow; + +for (flow =ICE_FLTR_PTYPE_NONF_NONE ; + flow <ICE_FLTR_PTYPE_MAX ; flow++) { + fdir->fdir_fltr_cnt[flow][0 ] =0 ; + fdir->fdir_fltr_cnt[flow][1 ] =0 ; + } +} +/** * ice_vc_fdir_has_prof_conflict * @vf: pointer to the VF structure
@@ -1998,6 +2013,7 @@ void ice_vf_fdir_init(struct ice_vf *vf)spin_lock_init (&fdir->ctx_lock); fdir->ctx_irq.flags =0 ; fdir->ctx_done.flags =0 ; +ice_vc_fdir_reset_cnt_all (fdir); }/**
Signature · 6 lines
2.25.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c static void ice_vc_fdir_rem_prof_all(struct ice_vf
Quoted 28 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Lingyu Liu
Sent: wtorek, 28 marca 2023 12:49
To: [email protected]
Subject: [Intel-wired-lan] [PATCH net V3] ice: Reset FDIR counter in FDIR init stageReset the FDIR counters when FDIR inits. Without this patch, when VF initializes or resets, all the FDIR counters are not cleaned, which may cause unexpected behaviors for future FDIR rule create (e.g., rule conflict).
Fixes 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF")Signed-off-by Junfeng Guo <[email protected]>Signed-off-by Lingyu Liu <[email protected]>---
v2: change commit message to apply more to a kernel use
v3: simplify commit message--- .../net/ethernet/intel/ice/ice_virtchnl_fdir.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c +0
-0@@ -541,6 +541,21 @@ static void ice_vc_fdir_rem_prof_all(struct ice_vf
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan