[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR11MB27317F1D61E7B50967DE8C90F005A@DM6PR11MB2731.namprd11.prod.outlook.com>
Date: Mon, 31 Jul 2023 13:57:42 +0000
From: "Jagielski, Jedrzej" <jedrzej.jagielski@...el.com>
To: "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: Grzegorz Szczurek <grzegorzx.szczurek@...el.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v2] i40e: Clear stats after
deleting tc
From: Brandeburg, Jesse <jesse.brandeburg@...el.com>
Sent: Sat, 29 Jul 2023 01:59
>On 7/27/2023 1:43 AM, Jedrzej Jagielski wrote:
>> From: Grzegorz Szczurek <grzegorzx.szczurek@...el.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
>> qdick had been removed, what is an unexpected behavior.
>
>qdisc
>
>> Stats should be reseted once qdick is removed.
>
>please reflow to 75 chars, please restate also as
>Stats should be reset once the qdisc is removed.
Sure, this will be corrected.
Thanks
>
>>
>> Fix this by resetting stats after deleting tc
>> by calling i40e_vsi_reset_stats() function after
>> distroying qdisc.
>
>destroying
>
>>
>> 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@...el.com>
>> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@...el.com>
>> ---
>> v2: Make the commit msg more detailed
>> ---
>> 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..e8e03ede1672 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 destroying qdisc reset all stats of the vsi */
>> + if (!vsi->mqprio_qopt.qopt.hw)
>> + i40e_vsi_reset_stats(vsi);
>> +
>> out:
>> return ret;
>> }
Powered by blists - more mailing lists