mbox series

[bpf-next,0/5] sockmap: Fix reading with splice(2)

Message ID 20240606-sockmap-splice-v1-0-4820a2ab14b5@datadoghq.com (mailing list archive)
Headers show
Series sockmap: Fix reading with splice(2) | expand

Message

Vincent Whitchurch via B4 Relay June 6, 2024, 9:27 a.m. UTC
I noticed that if the verdict callback returns SK_PASS, using splice(2)
to read from the socket doesn't work since it never sees the data queued
on to it.  As far as I can see, this is not a regression but just
something that has never worked.

This series attempts to fix it and add a test for it.

---
Vincent Whitchurch (5):
      net: Add splice_read to prot
      tcp_bpf: Fix reading with splice(2)
      selftests/bpf: sockmap: Exit with error on failure
      selftests/bpf: sockmap: Allow SK_PASS in verdict
      selftests/bpf: sockmap: Add basic splice(2) mode

 include/net/inet_common.h                  |  3 ++
 include/net/sock.h                         |  3 ++
 net/ipv4/af_inet.c                         | 18 ++++++-
 net/ipv4/tcp_bpf.c                         |  9 ++++
 net/ipv4/tcp_ipv4.c                        |  1 +
 net/ipv6/af_inet6.c                        |  2 +-
 net/ipv6/tcp_ipv6.c                        |  1 +
 tools/testing/selftests/bpf/test_sockmap.c | 78 +++++++++++++++++++++++++++++-
 8 files changed, 111 insertions(+), 4 deletions(-)
---
base-commit: 072088704433f75dacf9e33179dd7a81f0a238d4
change-id: 20240606-sockmap-splice-d371ac07d7b4

Best regards,