af_unix: Introduce SO_INQ & SCM_INQ.
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 7 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | af_unix: Don't hold unix_state_lock() in __unix_dgram_recvmsg().net/ | +1 | 1 reply | Applied |
| 2/7 | af_unix: Don't check SOCK_DEAD in unix_stream_read_skb().net/ | +0 | 0 replies | Applied |
| 3/7 | af_unix: Don't use skb_recv_datagram() in unix_stream_read_skb().net/ | +22 | 0 replies | Applied |
| 4/7 | af_unix: Use cached value for SOCK_STREAM in unix_inq_len().include/ net/ | +29 | 2 replies | Applied |
| 5/7 | af_unix: Cache state->msg in unix_stream_read_generic().net/ | +17 | 0 replies | Applied |
| 6/7 | af_unix: Introduce SO_INQ.arch/ arch/ arch/ +4 more | +76 | 2 replies | Applied |
| 7/7 | selftest: af_unix: Add test for SO_INQ.tools/ tools/ tools/ | +127 | 1 reply | Applied |
Reviews trailers per patch
4 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Willem de Bruijn |
|---|---|
| 1/7 | R-b |
| 2/7 | |
| 3/7 | |
| 4/7 | R-b |
| 5/7 | |
| 6/7 | R-b |
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 net-next 0/7] af_unix: Introduce SO_INQ & SCM_INQ.
We have an application that uses almost the same code for TCP and AF_UNIX (SOCK_STREAM).
The application uses TCP_INQ for TCP, but AF_UNIX doesn't have it and requires an extra syscall, ioctl(SIOCINQ) or getsockopt(SO_MEMINFO) as an alternative.
Also, ioctl(SIOCINQ) for AF_UNIX SOCK_STREAM is more expensive because it needs to iterate all skb in the receive queue.
This series adds a cached field for SIOCINQ to speed it up and introduce SO_INQ, the generic version of TCP_INQ to get the queue length as cmsg in each recvmsg().
Kuniyuki Iwashima (7):
af_unix: Don't hold unix_state_lock() in __unix_dgram_recvmsg().
af_unix: Don't check SOCK_DEAD in unix_stream_read_skb().
af_unix: Don't use skb_recv_datagram() in unix_stream_read_skb().
af_unix: Use cached value for SOCK_STREAM in unix_inq_len().
af_unix: Cache state->msg in unix_stream_read_generic().
af_unix: Introduce SO_INQ.
selftest: af_unix: Add test for SO_INQ.
arch/alpha/include/uapi/asm/socket.h | 3 + arch/mips/include/uapi/asm/socket.h | 3 + arch/parisc/include/uapi/asm/socket.h | 3 + arch/sparc/include/uapi/asm/socket.h | 3 + include/net/af_unix.h | 2 + include/uapi/asm-generic/socket.h | 3 + net/unix/af_unix.c | 180 ++++++++++++------ tools/testing/selftests/net/.gitignore | 1 + tools/testing/selftests/net/af_unix/Makefile | 2 +- tools/testing/selftests/net/af_unix/scm_inq.c | 125 ++++++++++++ 10 files changed, 269 insertions(+), 56 deletions(-) create mode 100644 tools/testing/selftests/net/af_unix/scm_inq.c
Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog