Skip to content

sock_map: clean up and refactor code for BPF_SK_SKB_VERDICT

Cong Wang bpf netdev 6 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. v7 Latest9 patches 4 repliesApplied
  2. v68 patches 13 repliesSuperseded
  3. v58 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v45 patches6 repliesSuperseded
v35 patches17 repliesSuperseded
v25 patches7 repliesSuperseded

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/9bpf: clean up sockmap related Kconfigsinclude/linux/bpf.h include/linux/bpf_types.h include/linux/skmsg.h +9 more+133 -1030 replies
2/9skmsg: get rid of struct sk_psock_parserinclude/linux/skmsg.h net/core/skmsg.c net/core/sock_map.c+27 -530 replies
3/9bpf: compute data_end dynamically with JIT codeinclude/net/tcp.h net/core/filter.c net/core/skmsg.c+28 -270 replies
4/9skmsg: move sk_redir from TCP_SKB_CB to skbinclude/linux/skbuff.h include/linux/skmsg.h include/net/tcp.h +2 more+62 -372 replies
5/9sock_map: rename skb_parser and skb_verdictinclude/linux/skmsg.h net/core/skmsg.c net/core/sock_map.c +2 more+47 -470 replies
6/9sock_map: make sock_map_prog_update() staticinclude/linux/bpf.h net/core/sock_map.c+5 -110 replies
7/9skmsg: make __sk_psock_purge_ingress_msg() staticinclude/linux/skmsg.h net/core/skmsg.c+1 -30 replies
8/9skmsg: get rid of sk_psock_bpf_run()net/core/skmsg.c+4 -100 replies
9/9skmsg: remove unused sk_psock_stop() declarationinclude/linux/skmsg.h+0 -11 reply

Reviews trailers per patch

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

PatchJohn FastabendJakub SitnickiLorenz Bauer
1/9A-b A-b R-b
2/9A-b A-b
3/9A-b A-b
4/9A-b A-b
5/9A-b A-b R-b
6/9A-b
7/9A-b
8/9A-b
9/9A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [Patch bpf-next v7 0/9] sock_map: clean up and refactor code for BPF_SK_SKB_VERDICT

From: Cong Wang <[email protected]>

This patchset is the first series of patches separated out from the original large patchset, to make reviews easier. This patchset does not add any new feature or change any functionality but merely cleans up the existing sockmap and skmsg code and refactors it, to prepare for the patches followed up. This passed all BPF selftests.

To see the big picture, the original whole patchset is available on github: https://github.com/congwang/linux/tree/sockmap

and this patchset is also available on github:
https://github.com/congwang/linux/tree/sockmap1

---
v7: add 1 trivial cleanup patch
define a mask for sk_redir
fix CONFIG_BPF_SYSCALL in include/net/udp.h make sk_psock_done_strp() static
move skb_bpf_redirect_clear() to sk_psock_backlog()

v6: fix !CONFIG_INET case

v5: improve CONFIG_BPF_SYSCALL dependency
add 3 trivial cleanup patches

v4: reuse skb dst instead of skb ext
fix another Kconfig error

v3: fix a few Kconfig compile errors
remove an unused variable
add a comment for bpf_convert_data_end_access()

v2: split the original patchset
compute data_end with bpf_convert_data_end_access() get rid of psock->bpf_running
reduce the scope of CONFIG_BPF_STREAM_PARSER do not add CONFIG_BPF_SOCK_MAP

Cong Wang (9):
bpf: clean up sockmap related Kconfigs
skmsg: get rid of struct sk_psock_parser
bpf: compute data_end dynamically with JIT code
skmsg: move sk_redir from TCP_SKB_CB to skb
sock_map: rename skb_parser and skb_verdict
sock_map: make sock_map_prog_update() static
skmsg: make __sk_psock_purge_ingress_msg() static
skmsg: get rid of sk_psock_bpf_run()
skmsg: remove unused sk_psock_stop() declaration

 include/linux/bpf.h                           |  29 +--
 include/linux/bpf_types.h                     |   6 +-
 include/linux/skbuff.h                        |   3 +
 include/linux/skmsg.h                         |  82 +++++--
 include/net/tcp.h                             |  41 +---
 include/net/udp.h                             |   4 +-
 init/Kconfig                                  |   1 +
 net/Kconfig                                   |   6 +-
 net/core/Makefile                             |   6 +-
 net/core/filter.c                             |  48 ++--
 net/core/skmsg.c                              | 212 +++++++++---------
 net/core/sock_map.c                           |  77 +++----
 net/ipv4/Makefile                             |   2 +-
 net/ipv4/tcp_bpf.c                            |   4 +-
 .../selftests/bpf/prog_tests/sockmap_listen.c |   8 +-
 .../selftests/bpf/progs/test_sockmap_listen.c |   4 +-
 16 files changed, 274 insertions(+), 259 deletions(-)
Signature · 1 line
2.25.1