All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Cc: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1] i40e: Clear stats after deleting tc
Date: Tue, 25 Jul 2023 14:25:02 +0200	[thread overview]
Message-ID: <ZL++xYriOfc2V6Fb@corigine.com> (raw)
In-Reply-To: <20230724094319.57359-1-jedrzej.jagielski@intel.com>

On Mon, Jul 24, 2023 at 11:43:19AM +0200, Jedrzej Jagielski wrote:
> From: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> 
> There was an issue with ethtool stats that
> have not been cleared after tc had been deleted.

I think it would be good to elaborate on what the issue is,
perhaps with an example. I think this should be added to
the patch description.

> Fix this by resetting stats after deleting tc
> by calling i40e_vsi_reset_stats() function after
> distroying qdisc.
> 
> Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 29ad1797adce..6f604bfe7437 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -5885,6 +5885,11 @@ static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc)
>  
>  	/* Update the netdev TC setup */
>  	i40e_vsi_config_netdev_tc(vsi, enabled_tc);
> +
> +	/* After distroying qdisc reset all stats of the vsi */

nit: distroying -> destroying

> +	if (!vsi->mqprio_qopt.qopt.hw)
> +		i40e_vsi_reset_stats(vsi);
> +
>  out:
>  	return ret;
>  }

-- 
pw-bot: changes-requested
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <simon.horman@corigine.com>
To: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	anthony.l.nguyen@intel.com,
	Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
Subject: Re: [PATCH iwl-next v1] i40e: Clear stats after deleting tc
Date: Tue, 25 Jul 2023 14:25:02 +0200	[thread overview]
Message-ID: <ZL++xYriOfc2V6Fb@corigine.com> (raw)
In-Reply-To: <20230724094319.57359-1-jedrzej.jagielski@intel.com>

On Mon, Jul 24, 2023 at 11:43:19AM +0200, Jedrzej Jagielski wrote:
> From: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> 
> There was an issue with ethtool stats that
> have not been cleared after tc had been deleted.

I think it would be good to elaborate on what the issue is,
perhaps with an example. I think this should be added to
the patch description.

> Fix this by resetting stats after deleting tc
> by calling i40e_vsi_reset_stats() function after
> distroying qdisc.
> 
> Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 29ad1797adce..6f604bfe7437 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -5885,6 +5885,11 @@ static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc)
>  
>  	/* Update the netdev TC setup */
>  	i40e_vsi_config_netdev_tc(vsi, enabled_tc);
> +
> +	/* After distroying qdisc reset all stats of the vsi */

nit: distroying -> destroying

> +	if (!vsi->mqprio_qopt.qopt.hw)
> +		i40e_vsi_reset_stats(vsi);
> +
>  out:
>  	return ret;
>  }

-- 
pw-bot: changes-requested

  reply	other threads:[~2023-07-25 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24  9:43 [Intel-wired-lan] [PATCH iwl-next v1] i40e: Clear stats after deleting tc Jedrzej Jagielski
2023-07-24  9:43 ` Jedrzej Jagielski
2023-07-25 12:25 ` Simon Horman [this message]
2023-07-25 12:25   ` Simon Horman
2023-07-26  9:23   ` [Intel-wired-lan] " Jagielski, Jedrzej
2023-07-26  9:23     ` Jagielski, Jedrzej

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=ZL++xYriOfc2V6Fb@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=grzegorzx.szczurek@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jedrzej.jagielski@intel.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.