Skip to content

skmsg: Add the data length in skmsg to SIOCINQ ioctl and rx_queue

Pengcheng Yang bpf netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesIn review
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Add READ_ONCE()/WRITE_ONCE() on accesses to psock->msg_len
- Mask out the increment msg_len where its not needed

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3skmsg: Support to get the data length in ingress_msginclude/linux/skmsg.h net/core/skmsg.c+33 -32 replies
2/3tcp: Add the data length in skmsg to SIOCINQ ioctlnet/ipv4/tcp.c+2 -10 replies
3/3tcp_diag: Add the data length in skmsg to rx_queuenet/ipv4/tcp_diag.c+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/3] skmsg: Add the data length in skmsg to SIOCINQ ioctl and rx_queue

When using skmsg redirect, the msg is queued in psock->ingress_msg, and the application calling SIOCINQ ioctl will return a readable length of 0, and we cannot track the data length of ingress_msg with the ss tool.

In this patch set, we added the data length in ingress_msg to the SIOCINQ ioctl and the rx_queue of tcp_diag.

v2:
- Add READ_ONCE()/WRITE_ONCE() on accesses to psock->msg_len
- Mask out the increment msg_len where its not needed

Pengcheng Yang (3):
skmsg: Support to get the data length in ingress_msg
tcp: Add the data length in skmsg to SIOCINQ ioctl
tcp_diag: Add the data length in skmsg to rx_queue

 include/linux/skmsg.h | 26 ++++++++++++++++++++++++--
 net/core/skmsg.c      | 10 +++++++++-
 net/ipv4/tcp.c        |  3 ++-
 net/ipv4/tcp_diag.c   |  2 ++
 4 files changed, 37 insertions(+), 4 deletions(-)
Signature · 1 line
2.38.1