[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210310152123.np4mlvhopky3ruph@skbuf>
Date: Wed, 10 Mar 2021 17:21:23 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Richard Cochran <richardcochran@...il.com>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
Po Liu <po.liu@....com>,
Claudiu Manoil <claudiu.manoil@....com>,
Vinicius Costa Gomes <vinicius.gomes@...el.com>
Subject: Re: [PATCH net-next] net: add a helper to avoid issues with HW TX
timestamping and SO_TXTIME
On Wed, Mar 10, 2021 at 07:16:26AM -0800, Richard Cochran wrote:
> On Wed, Mar 10, 2021 at 04:50:44PM +0200, Vladimir Oltean wrote:
> > As explained in commit 29d98f54a4fe ("net: enetc: allow hardware
> > timestamping on TX queues with tc-etf enabled"), hardware TX
> > timestamping requires an skb with skb->tstamp = 0. When a packet is sent
> > with SO_TXTIME, the skb->skb_mstamp_ns corrupts the value of skb->tstamp,
> > so the drivers need to explicitly reset skb->tstamp to zero after
> > consuming the TX time.
> >
> > Create a helper named skb_txtime_consumed() which does just that. All
>
> Bikeshedding about the name: "consumed" suggests much more to me than
> what is going on.
>
> How about this? skb_reset_txtime();
Not really a native speaker, but what more does it suggest? As far as
the Ethernet driver is concerned, it needs to consume the TX time (by
putting it into the TX buffer descriptor or whatever) and say it did
that. From the perspective of a driver writer I think it is intuitive to
have it called that way.
Powered by blists - more mailing lists