[Intel-wired-lan] [PATCH net-next v2] igc: Add TransmissionOverrun counter

Vladimir Oltean vladimir.oltean at nxp.com
Mon May 29 17:33:57 UTC 2023


On Mon, May 29, 2023 at 04:59:49PM +0300, Vladimir Oltean wrote:
> On Sun, May 28, 2023 at 10:10:18AM +0000, Zulkifli, Muhammad Husaini wrote:
> > Hi Jakub,
> > 
> > Sorry for the late response.
> > 
> > > On Tue, 2 May 2023 01:47:30 +0000 Zulkifli, Muhammad Husaini wrote:
> > > > > Seems like something that should be reported back to the qdisc which
> > > > > configured the gate.
> > > >
> > > > May I know which qdisc stats that we need to reported out? Is it
> > > gnet_stats_queue?
> > > > IMHO, gnet_stats_queue stats all used by SW QBV and not by HW QBV.
> > > 
> > > Yeah, definitely not gnet_stats_queue, the qdisc used to configure the gates can
> > > have its dedicated super special stats.
> > 
> > I'm not sure how this super special stat will be link to qdisc. 
> > I'm include Vladimir in this discussion to obtain his thoughts, 
> > as I feel this will be required for other vendors as well if we can come up 
> > with a generic approach.
> > 
> > Hi Vladimir,
> > 
> > Do you have any input about this TransmissionOverrun counter?
> > 
> > Thanks,
> > Husaini
> 
> Thanks for the question. I guess Jakub is talking about qdisc xstats
> (root and per class) which can be reported through the TCA_STATS_APP
> attribute of the TCA_STATS2 nest. In fact I've started working on a
> prototype of this (some infra will be required) and I'm currently
> debugging it :)

Okay, debugging done, here's what I've got:
https://github.com/vladimiroltean/linux/commits/sch-taprio-stats
https://github.com/vladimiroltean/iproute2/commits/taprio-xstats

Jakub, is this what you had in mind?

$ tc -d -s qdisc show dev eth0 root
Warning: sch_taprio: Size table not specified, frame length estimations may be inaccurate.
qdisc taprio 800e: root tc 8 map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0
queues offset 0 count 1 offset 1 count 1 offset 2 count 1 offset 3 count 1 offset 4 count 1 offset 5 count 1 offset 6 count 1 offset 7 count 1
 flags 0x2      base-time 0 cycle-time 1000000 cycle-time-extension 0
        index 0 cmd S gatemask 0x20 interval 200000
        index 1 cmd S gatemask 0xdf interval 800000
max-sdu 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
fp E E E E E E E E E E E E E E E E

 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 Window drops: 0 <----------------- this is new

$ tc -d -s class show dev eth0
class taprio 800e:1 root 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 Window drops: 0 <----------------- this is new
class taprio 800e:2 root 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 Window drops: 0 <----------------- this is new
class taprio 800e:3 root 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 Window drops: 0 <----------------- this is new
class taprio 800e:4 root 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 Window drops: 0 <----------------- this is new
class taprio 800e:5 root 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 Window drops: 0 <----------------- this is new
class taprio 800e:6 root 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 Window drops: 0 <----------------- this is new
class taprio 800e:7 root 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 Window drops: 0 <----------------- this is new
class taprio 800e:8 root 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
 Window drops: 0 <----------------- this is new

ENETC (on which I tested) doesn't overrun the taprio time gates, so it
has no reason to implement the TransmitOverrun counter that's being
discussed here. But it was a good opportunity to move a (non-standard)
counter from ethtool -S to the Qdisc layer :)


More information about the Intel-wired-lan mailing list