From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Lingyu Liu <lingyu.liu@intel.com>
Cc: intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH net v2] ice: add FDIR counter reset in FDIR init stage
Date: Fri, 10 Mar 2023 11:19:31 +0100 [thread overview]
Message-ID: <ZAsEM+P7D/AfreLY@localhost.localdomain> (raw)
In-Reply-To: <20230309024934.151120-1-lingyu.liu@intel.com>
On Thu, Mar 09, 2023 at 02:49:34AM +0000, Lingyu Liu wrote:
> From: Junfeng Guo <junfeng.guo@intel.com>
>
> This patch added the missing FDIR counters reset process when
> FDIR inits. Without this patch, when VF initializes or resets,
> all the FDIR counters will not be 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 <junfeng.guo@intel.com>
> Signed-off-by: Lingyu Liu <lingyu.liu@intel.com>
> ---
> v2: change commit message to apply more to a kernel use
> ---
> drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
> index e6ef6b303222..60c9da4aac1d 100644
> --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
> +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
> @@ -541,6 +541,20 @@ 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 = ICE_FLTR_PTYPE_NONF_NONE;
> +
> + for (; flow < ICE_FLTR_PTYPE_MAX; flow++) {
> + fdir->fdir_fltr_cnt[flow][0] = 0;
> + fdir->fdir_fltr_cnt[flow][1] = 0;
> + }
> +}
> +
> /**
> * ice_vc_fdir_write_flow_prof
> * @vf: pointer to the VF structure
> @@ -1924,6 +1938,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);
I am fine with this change, however, maybe the better place for
resetting counters will be when the flows are removed? Or maybe
the flow are removed only by hw?
> }
>
> /**
> --
> 2.25.1
>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-03-10 10:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 2:49 [Intel-wired-lan] [PATCH net v2] ice: add FDIR counter reset in FDIR init stage Lingyu Liu
2023-03-10 10:19 ` Michal Swiatkowski [this message]
2023-03-14 0:39 ` Liu, Lingyu
2023-03-27 8:34 ` Michal Swiatkowski
2023-03-27 9:08 ` Paul Menzel
2023-03-28 10:41 ` Liu, Lingyu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZAsEM+P7D/AfreLY@localhost.localdomain \
--to=michal.swiatkowski@linux.intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=lingyu.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox