[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210602143015.75e3f56e@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
Date: Wed, 2 Jun 2021 14:30:15 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Vladimir Oltean <olteanv@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Claudiu Manoil <claudiu.manoil@....com>,
Michael Walle <michael@...le.cc>, Po Liu <po.liu@....com>,
Vinicius Costa Gomes <vinicius.gomes@...el.com>,
Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH net-next 2/2] net: enetc: count the tc-taprio window
drops
On Wed, 2 Jun 2021 20:59:37 +0300 Vladimir Oltean wrote:
> On Wed, Jun 02, 2021 at 10:19:20AM -0700, Jakub Kicinski wrote:
> > On Wed, 2 Jun 2021 15:21:14 +0300 Vladimir Oltean wrote:
> > > From: Po Liu <Po.Liu@....com>
> > >
> > > The enetc scheduler for IEEE 802.1Qbv has 2 options (depending on
> > > PTGCR[TG_DROP_DISABLE]) when we attempt to send an oversized packet
> > > which will never fit in its allotted time slot for its traffic class:
> > > either block the entire port due to head-of-line blocking, or drop the
> >
> > the entire port or the entire queue?
>
> I don't remember, I need to re-test.
>
> > > packet and set a bit in the writeback format of the transmit buffer
> > > descriptor, allowing other packets to be sent.
> > >
> > > We obviously choose the second option in the driver, but we do not
> > > detect the drop condition, so from the perspective of the network stack,
> > > the packet is sent and no error counter is incremented.
> > >
> > > This change checks the writeback of the TX BD when tc-taprio is enabled,
> > > and increments a specific ethtool statistics counter and a generic
> > > "tx_dropped" counter in ndo_get_stats64.
> >
> > Any chance we should also report that back to the qdisc to have
> > a standard way of querying from user space? Qdisc offload supports
> > stats in general, it shouldn't be an issue, and the stat seems generic
> > enough, no?
>
> You're thinking of something along the lines of tc_codel_xstats?
> How do you propose I pass this on to the taprio qdisc? Just call a
> function in enetc that is exported by net/sched/sch_taprio.c?
Check out red_dump_offload_stats()/TC_RED_STATS, this is the usual way
of handling stats offload in TC.
> If the skb is bound to a socket, I'm thinking it might be more useful to
> report a struct sock_extended_err similar to the SO_EE_TXTIME_MISSED
> stuff for tc-etf, what do you think?
That's an interesting idea as well, dunno enough about the practical
uses to be able to tell if applications care about per-socket state,
per-interface state, or both.
Powered by blists - more mailing lists