Skip to content

Split bpf_sock dst_port field

Jakub Sitnicki bpf netdev 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied 2/2
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- use an anonymous field for zero padding (Alexei)

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: Make dst_port field in struct bpf_sock 16-bit wideinclude/uapi/linux/bpf.h net/core/filter.c+11 -20 repliesApplied
2/2selftests/bpf: Extend verifier and bpf_sock tests for dst_port loadstools/include/uapi/linux/bpf.h tools/testing/selftests/bpf/prog_tests/sock_fields.c tools/testing/selftests/bpf/progs/test_sock_fields.c +1 more+162 -210 repliesApplied

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMartin KaFai Lau
SeriesA-b
1/2
2/2

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

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/2] Split bpf_sock dst_port field

This is a follow-up to discussion around the idea of making dst_port in struct bpf_sock a 16-bit field that happened in [1].

v2:
- use an anonymous field for zero padding (Alexei)

v1:
- keep dst_field offset unchanged to prevent existing BPF program breakage (Martin)
- allow 8-bit loads from dst_port[0] and [1]
- add test coverage for the verifier and the context access converter

[1] https://lore.kernel.org/bpf/[email protected]/

Jakub Sitnicki (2):
bpf: Make dst_port field in struct bpf_sock 16-bit wide selftests/bpf: Extend verifier and bpf_sock tests for dst_port loads

 include/uapi/linux/bpf.h                      |  3 +-
 net/core/filter.c                             | 10 ++-
 tools/include/uapi/linux/bpf.h                |  3 +-
 .../selftests/bpf/prog_tests/sock_fields.c    | 58 +++++++++----
 .../selftests/bpf/progs/test_sock_fields.c    | 41 ++++++++++
 tools/testing/selftests/bpf/verifier/sock.c   | 81 ++++++++++++++++++-
 6 files changed, 173 insertions(+), 23 deletions(-)
Signature · 1 line
2.31.1