BPF List
 help / color / mirror / Atom feed
* [PATCH v3 bpf-next 0/6] bpf: volatile compare
@ 2023-12-26 19:11 Alexei Starovoitov
  2023-12-26 19:11 ` [PATCH v3 bpf-next 1/6] selftests/bpf: Attempt to build BPF programs with -Wsign-compare Alexei Starovoitov
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Alexei Starovoitov @ 2023-12-26 19:11 UTC (permalink / raw)
  To: bpf
  Cc: daniel, andrii, martin.lau, dxu, memxor, john.fastabend, jolsa,
	kernel-team

From: Alexei Starovoitov <ast@kernel.org>

v2->v3:
Debugged profiler.c regression. It was caused by basic block layout.
Introduce bpf_cmp_likely() and bpf_cmp_unlikely() macros.
Debugged redundant <<=32, >>=32 with u32 variables. Added cast workaround.

v1->v2:
Fixed issues pointed out by Daniel, added more tests, attempted to convert profiler.c,
but barrier_var() wins vs bpf_cmp(). To be investigated.
Patches 1-4 are good to go, but 5 needs more work.

Alexei Starovoitov (6):
  selftests/bpf: Attempt to build BPF programs with -Wsign-compare
  bpf: Introduce "volatile compare" macros
  selftests/bpf: Convert exceptions_assert.c to bpf_cmp
  selftests/bpf: Remove bpf_assert_eq-like macros.
  bpf: Add bpf_nop_mov() asm macro.
  selftests/bpf: Convert profiler.c to bpf_cmp.

 tools/testing/selftests/bpf/Makefile          |   1 +
 .../testing/selftests/bpf/bpf_experimental.h  | 224 ++++++------------
 .../bpf/progs/bpf_iter_bpf_percpu_hash_map.c  |   2 +-
 .../selftests/bpf/progs/bpf_iter_task_vmas.c  |   2 +-
 .../selftests/bpf/progs/bpf_iter_tasks.c      |   2 +-
 .../selftests/bpf/progs/bpf_iter_test_kern4.c |   2 +-
 .../progs/cgroup_getset_retval_setsockopt.c   |   2 +-
 .../selftests/bpf/progs/cgrp_ls_sleepable.c   |   2 +-
 .../selftests/bpf/progs/cpumask_success.c     |   2 +-
 .../testing/selftests/bpf/progs/exceptions.c  |  20 +-
 .../selftests/bpf/progs/exceptions_assert.c   |  80 +++----
 tools/testing/selftests/bpf/progs/iters.c     |   4 +-
 .../selftests/bpf/progs/iters_task_vma.c      |   3 +-
 .../selftests/bpf/progs/linked_funcs1.c       |   2 +-
 .../selftests/bpf/progs/linked_funcs2.c       |   2 +-
 .../testing/selftests/bpf/progs/linked_list.c |   2 +-
 .../selftests/bpf/progs/local_storage.c       |   2 +-
 tools/testing/selftests/bpf/progs/lsm.c       |   2 +-
 .../selftests/bpf/progs/normal_map_btf.c      |   2 +-
 .../selftests/bpf/progs/profiler.inc.h        |  68 ++----
 .../selftests/bpf/progs/sockopt_inherit.c     |   2 +-
 .../selftests/bpf/progs/sockopt_multi.c       |   2 +-
 .../selftests/bpf/progs/sockopt_qos_to_cc.c   |   2 +-
 .../testing/selftests/bpf/progs/test_bpf_ma.c |   2 +-
 .../bpf/progs/test_core_reloc_kernel.c        |   2 +-
 .../bpf/progs/test_core_reloc_module.c        |   8 +-
 .../selftests/bpf/progs/test_fsverity.c       |   2 +-
 .../bpf/progs/test_skc_to_unix_sock.c         |   2 +-
 .../bpf/progs/test_xdp_do_redirect.c          |   2 +-
 29 files changed, 173 insertions(+), 277 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-01-04 19:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-26 19:11 [PATCH v3 bpf-next 0/6] bpf: volatile compare Alexei Starovoitov
2023-12-26 19:11 ` [PATCH v3 bpf-next 1/6] selftests/bpf: Attempt to build BPF programs with -Wsign-compare Alexei Starovoitov
2023-12-26 19:11 ` [PATCH v3 bpf-next 2/6] bpf: Introduce "volatile compare" macros Alexei Starovoitov
2024-01-03 19:20   ` Andrii Nakryiko
2024-01-04  6:03     ` Alexei Starovoitov
2024-01-04 19:04       ` Andrii Nakryiko
2023-12-26 19:11 ` [PATCH v3 bpf-next 3/6] selftests/bpf: Convert exceptions_assert.c to bpf_cmp Alexei Starovoitov
2023-12-26 19:11 ` [PATCH v3 bpf-next 4/6] selftests/bpf: Remove bpf_assert_eq-like macros Alexei Starovoitov
2023-12-26 19:11 ` [PATCH v3 bpf-next 5/6] bpf: Add bpf_nop_mov() asm macro Alexei Starovoitov
2023-12-26 19:11 ` [PATCH v3 bpf-next 6/6] selftests/bpf: Convert profiler.c to bpf_cmp Alexei Starovoitov
2024-01-03 19:30 ` [PATCH v3 bpf-next 0/6] bpf: volatile compare patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox