Skip to content

Fixes for sock_fields selftests

Jakub Sitnicki bpf netdev 3 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. v3 Latest4 patches 1 replyApplied 4/4
  2. v23 patches 4 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v3 from the cover letter

- Split what was previously patch 2 which was doing two things
- Use BPF_TCP_* constants (Martin)
- Treat the result of 4-byte load from dst_port as a 16-bit value (Martin)
- Typo fixup and some rewording in patch 4 description

Patches in v3 All 4 applied

#Subject and filesSizeRepliesApplied
1/4selftests/bpf: Fix error reporting from sock_fields programstools/testing/selftests/bpf/progs/test_sock_fields.c+1 -10 repliesApplied
2/4selftests/bpf: Check dst_port only on the client sockettools/testing/selftests/bpf/progs/test_sock_fields.c+4 -00 repliesApplied
3/4selftests/bpf: Use constants for socket states in sock_fields testtools/testing/selftests/bpf/progs/test_sock_fields.c+5 -50 repliesApplied
4/4selftests/bpf: Fix test for 4-byte load from dst_port on big-endiantools/testing/selftests/bpf/progs/test_sock_fields.c+7 -10 repliesApplied

Reviews trailers per patch

1 of 4 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/4A-b
2/4
3/4
4/4

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

Read the v3 thread

Cover letter [PATCH bpf-next v3 0/4] Fixes for sock_fields selftests

I think we have reached a consensus [1] on how the test for the 4-byte load from bpf_sock->dst_port and bpf_sk_lookup->remote_port should look, so here goes v3.

I will submit a separate set of patches for bpf_sk_lookup->remote_port tests.

This series has been tested on x86_64 and s390 on top of recent bpf-next - ad13baf45691 ("selftests/bpf: Test subprog jit when toggle bpf_jit_harden repeatedly").

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

v2 -> v3:
- Split what was previously patch 2 which was doing two things
- Use BPF_TCP_* constants (Martin)
- Treat the result of 4-byte load from dst_port as a 16-bit value (Martin)
- Typo fixup and some rewording in patch 4 description

v1 -> v2:
- Limit read_sk_dst_port only to client traffic (patch 2)
- Make read_sk_dst_port pass on litte- and big-endian (patch 3)

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

Jakub Sitnicki (4):
selftests/bpf: Fix error reporting from sock_fields programs selftests/bpf: Check dst_port only on the client socket selftests/bpf: Use constants for socket states in sock_fields test selftests/bpf: Fix test for 4-byte load from dst_port on big-endian

 .../selftests/bpf/progs/test_sock_fields.c    | 24 +++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)
Signature · 1 line
2.35.1