[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <71075232-3d1a-4c0b-b4c2-ef426bb923eb@gmail.com>
Date: Thu, 5 Jun 2025 12:01:24 +0100
From: Pavel Begunkov <asml.silence@...il.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>, io-uring@...r.kernel.org
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
Kuniyuki Iwashima <kuniyu@...zon.com>, Paolo Abeni <pabeni@...hat.com>,
Willem de Bruijn <willemb@...gle.com>, "David S . Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Richard Cochran <richardcochran@...il.com>
Subject: Re: [PATCH v2 5/5] io_uring/netcmd: add tx timestamping cmd support
On 6/5/25 11:25, Vadim Fedorenko wrote:
> On 05/06/2025 01:59, Willem de Bruijn wrote:
>> Pavel Begunkov wrote:
...>>> +
>>> + tskey = serr->ee.ee_data;
>>> +
>>> + cqe->user_data = 0;
>>> + cqe->res = tskey;
>>> + cqe->flags = IORING_CQE_F_MORE;
>>> + cqe->flags |= (u32)serr->ee.ee_info << IORING_CQE_BUFFER_SHIFT;
>>> +
>>> + iots = (struct io_timespec *)&cqe[1];
>>> + iots->tv_sec = ts.tv_sec;
>>> + iots->tv_nsec = ts.tv_nsec;
>>
>> skb_get_tx_timestamp loses the information whether this is a
>> software or a hardware timestamp. Is that loss problematic?
>>
>> If a process only requests one type of timestamp, it will not be.
>>
>> But when requesting both (SOF_TIMESTAMPING_OPT_TX_SWHW) this per cqe
>> annotation may be necessary.
>
> skb_has_tx_timestamp() helper has clear priority of software timestamp,
> if enabled for the socket. Looks like SOF_TIMESTAMPING_OPT_TX_SWHW case
> won't produce both timestamps with the current implementation. Am I
> missing something?
I'll let Vadim handle the question as I hardly know anything about
the timestamping needs, but just wanted to add that it wouldn't be
a problem to pass a flag to the user for distinguishing sw vs hw if
needed.
--
Pavel Begunkov
Powered by blists - more mailing lists