Skip to content

selftests/bpf: fix endianness issues in test_sysctl

Ilya Leoshkevich bpf 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 Latest4 patches 1 replyApplied
  2. v32 patches 3 repliesSuperseded
  3. v21 patch 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch5 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4selftests/bpf: introduce bpf_cpu_to_be64 and bpf_be64_to_cputools/testing/selftests/bpf/bpf_endian.h tools/testing/selftests/bpf/progs/test_lwt_seg6local.c tools/testing/selftests/bpf/progs/test_seg6_loop.c+22 -160 replies
2/4selftests/bpf: fix "ctx:write sysctl:write read ok" on s390tools/testing/selftests/bpf/test_sysctl.c+1 -10 replies
3/4selftests/bpf: improve unexpected success reporting in test_syctltools/testing/selftests/bpf/test_sysctl.c+2 -10 replies
4/4selftests/bpf: fix endianness issues in test_sysctltools/testing/selftests/bpf/test_sysctl.c+82 -430 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH bpf v4 0/4] selftests/bpf: fix endianness issues in test_sysctl

Patch 1 is a preparatory commit, which introduces 64-bit endianness conversion functions.

Patch 2 fixes reading the wrong byte of an int.

Patch 3 improves error reporting.

Patch 4 uses the new conversion functions to fix wrong endianness of immediates.

v1->v2: Use bpf_ntohl and bpf_be64_to_cpu, drop __bpf_le64_to_cpu. v2->v3: Split bpf_be64_to_cpu introduction into a separate patch.
Use the new functions in test_lwt_seg6local.c and test_seg6_loop.c.
v3->v4: Improved commit message, split fixes that are not related to
each other into separate patches.

Ilya Leoshkevich (4):
selftests/bpf: introduce bpf_cpu_to_be64 and bpf_be64_to_cpu selftests/bpf: fix "ctx:write sysctl:write read ok" on s390 selftests/bpf: improve unexpected success reporting in test_syctl selftests/bpf: fix endianness issues in test_sysctl

 tools/testing/selftests/bpf/bpf_endian.h      |  14 ++
 .../selftests/bpf/progs/test_lwt_seg6local.c  |  16 +--
 .../selftests/bpf/progs/test_seg6_loop.c      |   8 +-
 tools/testing/selftests/bpf/test_sysctl.c     | 130 ++++++++++++------
 4 files changed, 107 insertions(+), 61 deletions(-)
Signature · 1 line
2.21.0