All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
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 v3] i40e: Clear stats after deleting tc
Date: Mon, 31 Jul 2023 18:30:58 +0200	[thread overview]
Message-ID: <ZMfhwh03CYvRuybr@kernel.org> (raw)
In-Reply-To: <20230731135218.10051-1-jedrzej.jagielski@intel.com>

On Mon, Jul 31, 2023 at 03:52:18PM +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. Stats printed by ethtool -S remained the same despite
> qdisc had been removed, what is an unexpected behavior.
> Stats should be reset once the qdisc is removed.
> 
> Fix this by resetting stats after deleting tc by calling
> i40e_vsi_reset_stats() function after destroying qdisc.
> 
> Steps to reproduce:
> 
> 1) Add ingress rule
> tc qdisc add dev <ethX> ingress
> 
> 2) Create qdisc and filter
> tc qdisc add dev <ethX> root mqprio num_tc 4 map 0 0 0 0 1 2 2 3 queues 2@0 2@2 1@4 1@5 hw 1 mode channel
> tc filter add dev <ethX> protocol ip parent ffff: prio 3 flower dst_ip <ip> ip_proto tcp dst_port 8300 skip_sw hw_tc 2
> 
> 3) Run iperf between client and SUT
> iperf3 -s -p 8300
> iperf3 -c <ip> -p 8300
> 
> 4) Check the ethtool stats
> ethtool -S <ethX> | grep packets | column
> 
> 5) Delete filter and qdisc
> tc filter del dev <ethX> parent ffff:
> tc qdisc del dev <ethX> root
> 
> 6) Check the ethtool stats and see that they didn't change
> ethtool -S <ethX> | grep packets | column
> 
> Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>

_______________________________________________
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 <horms@kernel.org>
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 v3] i40e: Clear stats after deleting tc
Date: Mon, 31 Jul 2023 18:30:58 +0200	[thread overview]
Message-ID: <ZMfhwh03CYvRuybr@kernel.org> (raw)
In-Reply-To: <20230731135218.10051-1-jedrzej.jagielski@intel.com>

On Mon, Jul 31, 2023 at 03:52:18PM +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. Stats printed by ethtool -S remained the same despite
> qdisc had been removed, what is an unexpected behavior.
> Stats should be reset once the qdisc is removed.
> 
> Fix this by resetting stats after deleting tc by calling
> i40e_vsi_reset_stats() function after destroying qdisc.
> 
> Steps to reproduce:
> 
> 1) Add ingress rule
> tc qdisc add dev <ethX> ingress
> 
> 2) Create qdisc and filter
> tc qdisc add dev <ethX> root mqprio num_tc 4 map 0 0 0 0 1 2 2 3 queues 2@0 2@2 1@4 1@5 hw 1 mode channel
> tc filter add dev <ethX> protocol ip parent ffff: prio 3 flower dst_ip <ip> ip_proto tcp dst_port 8300 skip_sw hw_tc 2
> 
> 3) Run iperf between client and SUT
> iperf3 -s -p 8300
> iperf3 -c <ip> -p 8300
> 
> 4) Check the ethtool stats
> ethtool -S <ethX> | grep packets | column
> 
> 5) Delete filter and qdisc
> tc filter del dev <ethX> parent ffff:
> tc qdisc del dev <ethX> root
> 
> 6) Check the ethtool stats and see that they didn't change
> ethtool -S <ethX> | grep packets | column
> 
> Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2023-07-31 16:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 13:52 [Intel-wired-lan] [PATCH iwl-next v3] i40e: Clear stats after deleting tc Jedrzej Jagielski
2023-07-31 13:52 ` Jedrzej Jagielski
2023-07-31 16:30 ` Simon Horman [this message]
2023-07-31 16:30   ` Simon Horman
2023-08-22  5:11 ` [Intel-wired-lan] " Sreenivas, Bharathi

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=ZMfhwh03CYvRuybr@kernel.org \
    --to=horms@kernel.org \
    --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.