public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/5] io_uring cmd for tx timestamps
@ 2025-06-16  9:46 Pavel Begunkov
  2025-06-16  9:46 ` [PATCH v5 1/5] net: timestamp: add helper returning skb's tx tstamp Pavel Begunkov
                   ` (6 more replies)
  0 siblings, 7 replies; 28+ messages in thread
From: Pavel Begunkov @ 2025-06-16  9:46 UTC (permalink / raw)
  To: io-uring, Vadim Fedorenko
  Cc: asml.silence, netdev, Eric Dumazet, Kuniyuki Iwashima,
	Paolo Abeni, Willem de Bruijn, David S . Miller, Jakub Kicinski,
	Richard Cochran, Stanislav Fomichev, Jason Xing

Vadim Fedorenko suggested to add an alternative API for receiving
tx timestamps through io_uring. The series introduces io_uring socket
cmd for fetching tx timestamps, which is a polled multishot request,
i.e. internally polling the socket for POLLERR and posts timestamps
when they're arrives. For the API description see Patch 5.

It reuses existing timestamp infra and takes them from the socket's
error queue. For networking people the important parts are Patch 1,
and io_uring_cmd_timestamp() from Patch 5 walking the error queue.

It should be reasonable to take it through the io_uring tree once
we have consensus, but let me know if there are any concerns.


v5: return SOF_TIMESTAMPING_TX_* from net helpers

v4: rename uapi flags, etc.

v3: Add a flag to distinguish sw vs hw timestamp. skb_get_tx_timestamp()
    from Patch 1 now returns the indication of that, and in Patch 5
    it's converted into a io_uring CQE bit flag.

v2: remove (rx) false timestamp handling
    fix skipping already queued events on request submission
    constantize socket in a helper

Pavel Begunkov (5):
  net: timestamp: add helper returning skb's tx tstamp
  io_uring/poll: introduce io_arm_apoll()
  io_uring/cmd: allow multishot polled commands
  io_uring: add mshot helper for posting CQE32
  io_uring/netcmd: add tx timestamping cmd support

 include/net/sock.h            |  4 ++
 include/uapi/linux/io_uring.h | 16 +++++++
 io_uring/cmd_net.c            | 82 +++++++++++++++++++++++++++++++++++
 io_uring/io_uring.c           | 40 +++++++++++++++++
 io_uring/io_uring.h           |  1 +
 io_uring/poll.c               | 44 +++++++++++--------
 io_uring/poll.h               |  1 +
 io_uring/uring_cmd.c          | 34 +++++++++++++++
 io_uring/uring_cmd.h          |  7 +++
 net/socket.c                  | 46 ++++++++++++++++++++
 10 files changed, 258 insertions(+), 17 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-07-08 18:01 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16  9:46 [PATCH v5 0/5] io_uring cmd for tx timestamps Pavel Begunkov
2025-06-16  9:46 ` [PATCH v5 1/5] net: timestamp: add helper returning skb's tx tstamp Pavel Begunkov
2025-06-16 14:53   ` Willem de Bruijn
2025-06-16 15:01   ` Willem de Bruijn
2025-06-16 16:37     ` Pavel Begunkov
2025-06-16 16:43       ` Willem de Bruijn
2025-06-17 16:30     ` Willem de Bruijn
2025-06-18  7:01   ` Jason Xing
2025-06-16  9:46 ` [PATCH v5 2/5] io_uring/poll: introduce io_arm_apoll() Pavel Begunkov
2025-06-16  9:46 ` [PATCH v5 3/5] io_uring/cmd: allow multishot polled commands Pavel Begunkov
2025-06-16  9:46 ` [PATCH v5 4/5] io_uring: add mshot helper for posting CQE32 Pavel Begunkov
2025-06-16  9:46 ` [PATCH v5 5/5] io_uring/netcmd: add tx timestamping cmd support Pavel Begunkov
2025-06-17 14:52 ` [PATCH v5 0/5] io_uring cmd for tx timestamps Jens Axboe
2025-06-17 22:29   ` Jakub Kicinski
2025-06-17 22:33     ` Jens Axboe
2025-06-17 22:41       ` Jakub Kicinski
2025-06-17 22:41         ` Jens Axboe
2025-06-20 14:31         ` Jens Axboe
2025-06-20 16:30           ` Pavel Begunkov
2025-06-20 19:46           ` Jakub Kicinski
2025-06-21  0:45             ` Jens Axboe
2025-06-23 15:00             ` Jens Axboe
2025-06-23 15:01 ` (subset) " Jens Axboe
2025-06-27 17:07   ` Jens Axboe
2025-06-28  6:10     ` Pavel Begunkov
2025-07-08 17:55       ` Jens Axboe
2025-07-08 18:00         ` Pavel Begunkov
2025-07-08 18:00           ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox