Skip to content

bpf: sockmap, sockhash: support storing UDP sockets

Lorenz Bauer bpf linux-kselftest lkml netdev 4 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest12 patches 1 replyApplied
  2. v312 patches 21 repliesSuperseded
  3. v29 patches 10 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches11 repliesSuperseded

Changes in v4 from the cover letter

- Clarify !psock check in sock_map_link_no_progs

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/12bpf: sockmap: only check ULP for TCP socketsinclude/linux/skmsg.h include/net/inet_connection_sock.h net/core/sock_map.c +1 more+15 -120 replies
2/12skmsg: update saved hooks only onceinclude/linux/skmsg.h net/ipv4/tcp_bpf.c+17 -190 replies
3/12bpf: tcp: move assertions into tcp_bpf_get_protoinclude/net/tcp.h net/core/sock_map.c net/ipv4/tcp_bpf.c+31 -370 replies
4/12bpf: tcp: guard declarations with CONFIG_NET_SOCK_MSGinclude/net/tcp.h+2 -20 replies
5/12bpf: sockmap: move generic sockmap hooks from BPF TCPinclude/linux/bpf.h include/linux/skmsg.h include/net/tcp.h +2 more+118 -1190 replies
6/12bpf: sockmap: simplify sock_map_init_protonet/core/sock_map.c+4 -150 replies
7/12bpf: add sockmap hooks for UDP socketsMAINTAINERS include/net/udp.h net/ipv4/Makefile +1 more+60 -00 replies
8/12bpf: sockmap: add UDP supportnet/core/sock_map.c+33 -40 replies
9/12selftests: bpf: don't listen() on UDP socketstools/testing/selftests/bpf/prog_tests/sockmap_listen.c+25 -220 replies
10/12selftests: bpf: add tests for UDP sockets in sockmaptools/testing/selftests/bpf/prog_tests/sockmap_listen.c+127 -300 replies
11/12selftests: bpf: enable UDP sockmap reuseport teststools/testing/selftests/bpf/prog_tests/select_reuseport.c+0 -60 replies
12/12bpf, doc: update maintainers for L7 BPFMAINTAINERS+2 -00 replies

Reviews trailers per patch

All 12 patches have a Reviewed-by or Acked-by.

PatchJakub SitnickiJohn Fastabend
1/12R-b A-b
2/12R-b A-b
3/12R-b A-b
4/12R-b A-b
5/12R-b A-b
6/12R-b A-b
7/12A-b
8/12A-b
9/12R-b A-b
10/12A-b
11/12R-b A-b
12/12R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH bpf-next v4 00/12] bpf: sockmap, sockhash: support storing UDP sockets

I've adressed John's nit in patch 3, and added the reviews and acks.

Changes since v3:
- Clarify !psock check in sock_map_link_no_progs

Changes since v2:
- Remove sk_psock_hooks based on Jakub's idea
- Fix reference to tcp_bpf_clone in commit message
- Add inet_csk_has_ulp helper

Changes since v1:
- Check newsk->sk_prot in tcp_bpf_clone
- Fix compilation with BPF_STREAM_PARSER disabled
- Use spin_lock_init instead of static initializer
- Elaborate on TCPF_SYN_RECV
- Cosmetic changes to TEST macros, and more tests
- Add Jakub and me as maintainers

Lorenz Bauer (12):
bpf: sockmap: only check ULP for TCP sockets
skmsg: update saved hooks only once
bpf: tcp: move assertions into tcp_bpf_get_proto
bpf: tcp: guard declarations with CONFIG_NET_SOCK_MSG
bpf: sockmap: move generic sockmap hooks from BPF TCP
bpf: sockmap: simplify sock_map_init_proto
bpf: add sockmap hooks for UDP sockets
bpf: sockmap: add UDP support
selftests: bpf: don't listen() on UDP sockets
selftests: bpf: add tests for UDP sockets in sockmap
selftests: bpf: enable UDP sockmap reuseport tests bpf, doc: update maintainers for L7 BPF

 MAINTAINERS                                   |   3 +
 include/linux/bpf.h                           |   4 +-
 include/linux/skmsg.h                         |  56 ++---
 include/net/inet_connection_sock.h            |   6 +
 include/net/tcp.h                             |  20 +-
 include/net/udp.h                             |   5 +
 net/core/sock_map.c                           | 157 +++++++++++---
 net/ipv4/Makefile                             |   1 +
 net/ipv4/tcp_bpf.c                            | 114 ++--------
 net/ipv4/tcp_ulp.c                            |   7 -
 net/ipv4/udp_bpf.c                            |  53 +++++
 .../bpf/prog_tests/select_reuseport.c         |   6 -
 .../selftests/bpf/prog_tests/sockmap_listen.c | 204 +++++++++++++-----
 13 files changed, 402 insertions(+), 234 deletions(-)
 create mode 100644 net/ipv4/udp_bpf.c
Signature · 1 line
2.20.1