netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/5] sockmap: Fix reading with splice(2)
@ 2025-06-09 13:26 Vincent Whitchurch via B4 Relay
  2025-06-09 13:26 ` [PATCH bpf-next v2 1/5] net: Add splice_read to prot Vincent Whitchurch via B4 Relay
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Vincent Whitchurch via B4 Relay @ 2025-06-09 13:26 UTC (permalink / raw)
  To: John Fastabend, Jakub Sitnicki
  Cc: Kuniyuki Iwashima, netdev, bpf, Vincent Whitchurch

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.

---
Changes in v2:
- Rebase on latest bpf-next/master
- Remove unnecessary change in inet_dgram_ops
- Remove ->splice_read NULL check in inet_splice_read()
- Use INDIRECT_CALL_1() in inet_splice_read()
- Include test case in default test suite in test_sockmap
- Link to v1: https://lore.kernel.org/r/20240606-sockmap-splice-v1-0-4820a2ab14b5@datadoghq.com

---
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 splice + SK_PASS regression test

 include/net/inet_common.h                  |  3 +
 include/net/sock.h                         |  3 +
 net/ipv4/af_inet.c                         | 13 ++++-
 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 | 90 +++++++++++++++++++++++++++++-
 8 files changed, 118 insertions(+), 4 deletions(-)
---
base-commit: e41079f53e8792c99cc8888f545c31bc341ea9ac
change-id: 20240606-sockmap-splice-d371ac07d7b4

Best regards,
-- 
Vincent Whitchurch <vincent.whitchurch@datadoghq.com>



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

end of thread, other threads:[~2025-06-20 15:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 13:26 [PATCH bpf-next v2 0/5] sockmap: Fix reading with splice(2) Vincent Whitchurch via B4 Relay
2025-06-09 13:26 ` [PATCH bpf-next v2 1/5] net: Add splice_read to prot Vincent Whitchurch via B4 Relay
2025-06-09 19:21   ` Jakub Kicinski
2025-06-11  8:57     ` Vincent Whitchurch
2025-06-20 15:44       ` Vincent Whitchurch
2025-06-09 13:26 ` [PATCH bpf-next v2 2/5] tcp_bpf: Fix reading with splice(2) Vincent Whitchurch via B4 Relay
2025-06-09 13:27 ` [PATCH bpf-next v2 3/5] selftests/bpf: sockmap: Exit with error on failure Vincent Whitchurch via B4 Relay
2025-06-09 13:27 ` [PATCH bpf-next v2 4/5] selftests/bpf: sockmap: Allow SK_PASS in verdict Vincent Whitchurch via B4 Relay
2025-06-09 13:27 ` [PATCH bpf-next v2 5/5] selftests/bpf: sockmap: Add splice + SK_PASS regression test Vincent Whitchurch via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).