[PATCH bpf-next v2] ARC: Add eBPF JIT support

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi This will add eBPF JIT support to the 32-bit ARCv2 processors. The implementation is qualified by running the BPF tests on a Synopsys HSDK board with "ARC HS38 v2.1c at 500 MHz" as the 4-core CPU. The test_bpf.ko reports 2-10 fold improvements in execution time of its tests.

Re: [PATCH bpf-next v1] ARC: Add eBPF JIT support

2024-04-30 Thread Shahab Vahedi
Shahab Vahedi writes: > > Björn Töpel writes: >> >> Please try to avoid static inline in the C-files. The compiler usually >> knows better. > > I will replace them with "static" then. I have tried [1] this and the test execution time took a performance hit of 35%. Therefore, I have not included

[off-list] [PATCH 0/7 bpf-next v2] ARC: Add eBPF JIT support

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi [off-list] Hi Björn, First and foremost, I apologise that it took me a long time to rework what we have discussed about the first version of "ARC: Add eBPF JIT support" patch. In order to make the second review easier for you, since you already have reviewed PATCH v1 [1], I

[PATCH 4/7] v2: MAINTAINERS: Add "BPF JIT for ARC" entry

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 943921d642ad..b6a946d24f00 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3712,6 +3712,12 @@ S: Maintained F: Documentation/devicetree/bindings/iio/imu/bosch,b

[PATCH 2/7] v2: Turn "zext_thyself" from global into a context var

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi also: - Update some comments along the way. - Refactor the gen_swap()'s "if/else" to present the logic better - Remove "extern" from the proto-type --- arch/arc/net/bpf_jit.h | 14 +- arch/arc/net/bpf_jit_arcv2.c | 51 ++-- arch/

[PATCH 5/7] v2: Fix typos

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi --- arch/arc/net/bpf_jit_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arc/net/bpf_jit_core.c b/arch/arc/net/bpf_jit_core.c index 9c0fdd514967..6692272fa1ac 100644 --- a/arch/arc/net/bpf_jit_core.c +++ b/arch/arc/net/bpf_jit_core.c @@ -9,

[PATCH 1/7] v2: Turn "emit" from global into a context var

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi Plus an easter egg: Add "static" to do_{normal,extra}_pass() proto-type, so GCC won't complain about missing proto-type before invocation. --- arch/arc/net/bpf_jit.h | 14 +- arch/arc/net/bpf_jit_arcv2.c | 409 ++- arch/arc/net/bpf_jit_c

[PATCH 3/7] v2: Use memset() in jit_ctx_init()

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi --- arch/arc/net/bpf_jit_core.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/arch/arc/net/bpf_jit_core.c b/arch/arc/net/bpf_jit_core.c index 79ec0bbf1153..9c0fdd514967 100644 --- a/arch/arc/net/bpf_jit_core.c +++ b/arch/arc/net/bp

[PATCH 7/7] v2: Check "bpf_jit_binary_lock_ro()" return value

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi ...after the rebase. --- arch/arc/net/bpf_jit_core.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/arch/arc/net/bpf_jit_core.c b/arch/arc/net/bpf_jit_core.c index 00c99b339b4a..6f6b4ffccf2c 100644 --- a/arch/arc/net/bpf_jit

[PATCH 6/7] v2: Fix most of the "Checks" from "checkpatch.pl"

2024-04-30 Thread Shahab Vahedi
From: Shahab Vahedi If they're left untouched, then it was decided like that. The command that was used for checkpatch.pl: $ checkpatch.pl ... --strict --no-signoff \ --ignore AVOID_BUG,SPLIT_STRING,COMMIT_MESSAGE \ --git .. ---

Re: [linux-next:master 4535/6266] arch/arc/include/asm/cmpxchg.h:73:27: error: implicit declaration of function 'cmpxchg_emu_u8'

2024-04-30 Thread Paul E. McKenney
On Tue, Apr 16, 2024 at 05:07:03AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > master > head: 6bd343537461b57f3efe5dfc5fc193a232dfef1e > commit: d4f26ed66a53be57567bf71d60e80a116cec34e1 [4535/6266] ARC: Emulate > one-byte cmpxc