History

net_tstamp: add SCM_TS_OPT_ID to provide OPT_ID in control message

SOF_TIMESTAMPING_OPT_ID socket option flag gives a way to correlate TX timestamps and packets sent via socket. Unfortunately, there is no way to reliably predict socket timestamp ID value in case of error returned by sendmsg. For UDP sockets it's impossible because of lockless nature of UDP transmit, several threads may send packets in parallel. In case of RAW sockets MSG_MORE option makes things complicated. More details are in the conversation [1]. This patch adds new control message type to give user-space software an opportunity to control the mapping between packets and values by providing ID with each sendmsg for UDP sockets. The documentation is also added in this patch. [1] https://lore.kernel.org/netdev/CALCETrU0jB+kg0mhV6A8mrHfTE1D1pr1SD_B9Eaa9aDPfgHdtA@mail.gmail.com/

Vadim Fedorenko committed 2 years ago

Commit 4aecca41 parent 34ea1df11 files · +75 −12Browse files

Showing the changes to include/uapi (1 of 11 files). Show all

Unified · Split

include/uapi/asm-generic/socket.h+2−0
@@ -141,6 +141,8 @@ · 140 unmodified lines
141#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF141#define SCM_DEVMEM_DMABUF SO_DEVMEM_DMABUF
142#define SO_DEVMEM_DONTNEED 80142#define SO_DEVMEM_DONTNEED 80
143 143
144#define SCM_TS_OPT_ID 81
145
144#if !defined(__KERNEL__)146#if !defined(__KERNEL__)
145 147
146#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))148#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t