[PATCH 2/3] libbpf: Remove powerpc prefix from syscall function names

2024-11-03 Thread Saket Kumar Bhaskar
is reason, arch specific prefix for syscall functions in powerpc is dropped. Signed-off-by: Saket Kumar Bhaskar --- tools/lib/bpf/libbpf.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 219facd0e66e..3a370fa37d8a 100

[PATCH 0/3] Fix test_bpf_syscall_macro selftest on powerpc

2024-11-03 Thread Saket Kumar Bhaskar
Since, syscall wrapper is supported on powerpc with syscall entry symbols as sys_*, changes done to fix selftests like test_bpf_syscall_macro, attach_probe/auto, etc. Saket Kumar Bhaskar (3): libbpf: Fix accessing the syscall argument on powerpc libbpf: Remove powerpc prefix from syscall

[PATCH 1/3] libbpf: Fix accessing the syscall argument on powerpc

2024-11-03 Thread Saket Kumar Bhaskar
s390 and arm64. Signed-off-by: Saket Kumar Bhaskar --- tools/lib/bpf/bpf_tracing.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h index a8f6cd4841b0..933e1dab6c8f 100644 --- a/tools/lib/bpf/bpf_tracing.h +++

[PATCH 3/3] selftests/bpf: Define SYS_PREFIX for powerpc

2024-11-03 Thread Saket Kumar Bhaskar
SYS_PREFIX was missing for a powerpc, which made a kprobe test to sys_prctl fail. Add missing SYS_PREFIX for powerpc. Fixes: 7e92e01b7245 ("powerpc: Provide syscall wrapper") Fixes: 94746890202c ("powerpc: Don't add __powerpc_ prefix to syscall entry points") Signed-of

Re: [PATCH 2/3] libbpf: Remove powerpc prefix from syscall function names

2024-11-20 Thread Saket Kumar Bhaskar
On Fri, Nov 08, 2024 at 10:43:54AM -0800, Andrii Nakryiko wrote: > On Sun, Nov 3, 2024 at 9:00 PM Saket Kumar Bhaskar > wrote: > > > > Since commit 94746890202cf ("powerpc: Don't add __powerpc_ prefix to > > syscall entry points") drops _powerpc prefix t

[PATCH] selftests/bpf: Fix fill_link_info selftest on powerpc

2024-12-08 Thread Saket Kumar Bhaskar
00 63 38 addir3,r3,1 c0f95198: b4 07 63 7c extsw r3,r3 c0f9519c: 20 00 80 4e blr [1] https://lore.kernel.org/all/20241030070850.1361304-13-hbath...@linux.ibm.com/ Fixes: 23cf7aa539dc ("selftests/bpf: Add selftest for fill_link_info")

[PATCH v2 2/2] selftests/bpf: Select NUMA_NO_NODE to create map

2025-01-30 Thread Saket Kumar Bhaskar
, if no CPUs are allocated from NUMA node 0. This patch fixes the issue by setting NUMA_NO_NODE (-1) for map creation for this selftest. Fixes: 96eabe7a40aa ("bpf: Allow selecting numa node during map creation") Signed-off-by: Saket Kumar Bhaskar --- tools/testing/selftests/bpf/

[PATCH v2 1/2] selftests/bpf: Define SYS_PREFIX for powerpc

2025-01-30 Thread Saket Kumar Bhaskar
same release. So, add the missing empty SYS_PREFIX prefix definition for powerpc, to fix some fentry and kprobe selftests. Signed-off-by: Saket Kumar Bhaskar --- tools/testing/selftests/bpf/progs/bpf_misc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/bpf/progs/bp

Re: [PATCH] bpf: Fix mix-up of 4096 and page size.

2025-02-03 Thread Saket Kumar Bhaskar
On Tue, Jan 28, 2025 at 04:03:11PM +0100, Alexander Lobakin wrote: > From: Alexei Starovoitov > Date: Thu, 23 Jan 2025 21:14:04 -0800 > > > On Wed, Jan 22, 2025 at 10:38 AM Saket Kumar Bhaskar > > wrote: > >> > >> For platforms on powerpc architecture wit

[PATCH] selftests/bpf: Fix test_xdp_adjust_tail_grow2 selftest on powerpc

2025-01-10 Thread Saket Kumar Bhaskar
On powerpc cache line size is 128 bytes, so skb_shared_info must be aligned accordingly. Signed-off-by: Saket Kumar Bhaskar --- tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 2 ++ tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c | 2 ++ 2 files changed, 4

Re: [PATCH 2/3] libbpf: Remove powerpc prefix from syscall function names

2025-01-11 Thread Saket Kumar Bhaskar
CCing Maddy and MPE On Fri, Jan 10, 2025 at 02:29:42PM -0800, Andrii Nakryiko wrote: > On Fri, Jan 10, 2025 at 2:49 AM Saket Kumar Bhaskar > wrote: > > > > On Thu, Nov 21, 2024 at 04:00:13PM -0800, Andrii Nakryiko wrote: > > > On Wed, Nov 20, 2024 at 6:52 AM Saket

[PATCH] bpf: Fix mix-up of 4096 and page size.

2025-01-22 Thread Saket Kumar Bhaskar
est_run_xdp()") Signed-off-by: Saket Kumar Bhaskar --- net/bpf/test_run.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index 501ec4249..eb5476184 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -124,7 +124,7 @@ stru

Re: [PATCH 2/2] selftests/bpf: Select NUMA node of current CPU to create map

2025-01-27 Thread Saket Kumar Bhaskar
On Sat, Jan 25, 2025 at 09:02:37AM -0800, Alexei Starovoitov wrote: > On Sat, Jan 25, 2025 at 7:25 AM Saket Kumar Bhaskar > wrote: > > > > On powerpc, a CPU does not necessarily originate from NUMA node 0. > > This contrasts with architectures like x86, where CPU 0

[PATCH 1/2] selftests/bpf: Define SYS_PREFIX for powerpc

2025-01-25 Thread Saket Kumar Bhaskar
the same release. So, add the missing empty SYS_PREFIX prefix definition for powerpc, to fix some fentry and kprobe selftests. Signed-off-by: Saket Kumar Bhaskar --- tools/testing/selftests/bpf/progs/bpf_misc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/bpf/

[PATCH 2/2] selftests/bpf: Select NUMA node of current CPU to create map

2025-01-25 Thread Saket Kumar Bhaskar
, if no CPUs are allocated from NUMA node 0. This patch fixes the issue by setting NUMA node for map creation to NUMA node of the current CPU. Fixes: 96eabe7a40aa ("bpf: Allow selecting numa node during map creation") Signed-off-by: Saket Kumar Bhaskar --- tools/testing/selftests/bp

Re: [PATCH 2/3] libbpf: Remove powerpc prefix from syscall function names

2025-01-15 Thread Saket Kumar Bhaskar
On Tue, Jan 14, 2025 at 02:40:20PM -0800, Andrii Nakryiko wrote: > On Sat, Jan 11, 2025 at 11:53 AM Saket Kumar Bhaskar > wrote: > > > > CCing Maddy and MPE > > On Fri, Jan 10, 2025 at 02:29:42PM -0800, Andrii Nakryiko wrote: > > > On Fri, Jan 10, 2025 at 2:49 AM

Re: [PATCH 2/3] libbpf: Remove powerpc prefix from syscall function names

2025-01-10 Thread Saket Kumar Bhaskar
On Thu, Nov 21, 2024 at 04:00:13PM -0800, Andrii Nakryiko wrote: > On Wed, Nov 20, 2024 at 6:52 AM Saket Kumar Bhaskar > wrote: > > > > On Fri, Nov 08, 2024 at 10:43:54AM -0800, Andrii Nakryiko wrote: > > > On Sun, Nov 3, 2024 at 9:00 PM Saket Kumar Bhaskar > &g

[PATCH] selftests/bpf: Fix sockopt selftest failure on powerpc

2025-03-11 Thread Saket Kumar Bhaskar
for powerpc. Signed-off-by: Saket Kumar Bhaskar --- tools/testing/selftests/bpf/progs/bpf_tracing_net.h | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/bpf/progs/bpf_tracing_net.h b/tools/testing/selftests/bpf/progs/bpf_tracing_net.h index 59843b430f76..bcd44d5018bf

Re: [PATCH v2 0/2] Fix xdp_adjust_frags_tail_grow selftest on powerpc

2025-03-11 Thread Saket Kumar Bhaskar
On Fri, Mar 07, 2025 at 08:54:00PM +0530, Venkat Rao Bagalkote wrote: > > On 05/03/25 10:43 pm, Saket Kumar Bhaskar wrote: > > For platforms on powerpc architecture with a default page size greater > > than 4096, there was an inconsistency in fragment size calculation. >

[PATCH v2 0/2] Fix xdp_adjust_frags_tail_grow selftest on powerpc

2025-03-05 Thread Saket Kumar Bhaskar
* Use dynamic page size, cacheline size and size of struct skb_shared_info to calculate parameters. * Fixed both test_run and selftest. v1: https://lore.kernel.org/all/20250122183720.1411176-1-sk...@linux.ibm.com/ Saket Kumar Bhaskar (2): bpf, test_run: Replace hardcoded page

[PATCH v2 1/2] bpf, test_run: Replace hardcoded page size with dynamic PAGE_SIZE in test_run

2025-03-05 Thread Saket Kumar Bhaskar
Replace fixed value 4096 with PAGE_SIZE for calculating the max_data_sz in bpf_prog_test_run_xdp, which allows for a more accurate determination of max_data_sz, considering different default page sizes across different architectures. Signed-off-by: Saket Kumar Bhaskar --- net/bpf/test_run.c

[PATCH v2 2/2] selftests/bpf: Refactor xdp_adjust_tail selftest with dynamic sizing

2025-03-05 Thread Saket Kumar Bhaskar
and communicated to the BPF program using a map: 1. Page size and cache line size are obtained using sysconf. 2. The size of struct skb_shared_info is determined using BTF. Signed-off-by: Saket Kumar Bhaskar --- .../bpf/prog_tests/xdp_adjust_tail.c | 160 +- .../bpf/progs

Re: [PATCH v2 0/2] Fix xdp_adjust_frags_tail_grow selftest on powerpc

2025-03-20 Thread Saket Kumar Bhaskar
On 05/03/25 10:43 pm, Saket Kumar Bhaskar wrote: > > For platforms on powerpc architecture with a default page size greater > > than 4096, there was an inconsistency in fragment size calculation. > > This caused the BPF selftest xdp_adjust_tail/xdp_adjust_frags_tail_grow > &g