mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Huacai Chen <chenhuacai@kernel.org>,
	Hengqi Chen <hengqi.chen@gmail.com>
Cc: loongarch@lists.linux.dev, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] LoongArch: BPF: Optimize 32-bit operations using native instructions
Date: Sat, 17 Oct 2026 18:58:22 +0800	[thread overview]
Message-ID: <c6a049d4-80c1-c3a4-e4de-87b582864e01@loongson.cn> (raw)
In-Reply-To: <DM6D33SL63BR.HOFSY6JUHO44@gmail.com>

On 2026/10/16 下午11:18, Alexei Starovoitov wrote:
> On Fri, Oct 16, 2026 at 04:10 PM Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
> 
>> All of the testcases of test_bpf passed on Loongson-3A6000 (with DIV32)
>> and Loongson-3A5000 (without DIV32), here are the test results:
> 
> fyi test_bpf is gone. See
> commit 4532e525b286 ("selftests/bpf: Remove the old test_bpf module").
> Pls run test_progs

I tested this series based on bpf-next tree with "./test_progs -a jit_insns"
and "./test_progs -a jit_insns_blinded", there are 3 pre-existing failures:
(1) #191/1   jit_insns/arena access with zero offset:FAIL
(2) #191/25  jit_insns/ldst_offsets:FAIL
(3) #192/11  jit_insns_blinded/ldst_offsets:FAIL

These 3 failures are entirely unrelated to this series; they still fail on
the clean, original bpf-next tree without this series.

The root cause is that LoongArch BPF JIT support for arena atomics and
sign-extending loads from arena is still a work-in-progress.

IIUC, there are already two patches to fix them, but need revisions:
https://lore.kernel.org/loongarch/20260702022322.51033-8-dongtai.guo@linux.dev/
https://lore.kernel.org/loongarch/20260702022322.51033-7-dongtai.guo@linux.dev/

Bypassing these known architectural gaps using the blacklist (-b) option
allows the remaining subtests under jit_insns and jit_insns_blinded to pass:

$ sudo ./test_progs -a jit_insns -b "jit_insns/arena access with zero 
offset,jit_insns/ldst_offsets"
#191/2   jit_insns/cast to a user address:OK
#191/3   jit_insns/alu_imm:OK
#191/4   jit_insns/alu_reg:OK
#191/5   jit_insns/alu_imm_regs:OK
#191/6   jit_insns/div_const:OK
#191/7   jit_insns/alu_reg_pairs:OK
#191/8   jit_insns/alu_edges:OK
#191/9   jit_insns/shifts:OK
#191/10  jit_insns/shift_counts:OK
#191/11  jit_insns/atomics:OK
#191/12  jit_insns/atomic_reg_pairs:OK
#191/13  jit_insns/xadd_chain:OK
#191/14  jit_insns/ld_imm64:OK
#191/15  jit_insns/jmp_imm:OK
#191/16  jit_insns/jmp_reg:OK
#191/17  jit_insns/jmp_reg_pairs:OK
#191/18  jit_insns/jmp_edges:OK
#191/19  jit_insns/staggered_jumps:OK
#191/20  jit_insns/max_jmp:OK
#191/21  jit_insns/convergence:OK
#191/22  jit_insns/calls:OK
#191/23  jit_insns/helper_calls:OK
#191/24  jit_insns/ldst_zero_off:OK
#191/26  jit_insns/acq_rel:OK
#191/27  jit_insns/movsx:OK
#191/28  jit_insns/jset_imm:OK
#191/29  jit_insns/cmp_imm:OK
#191/30  jit_insns/alu_consts:OK
#191/31  jit_insns/bswap:OK
#191/32  jit_insns/probe_mem:OK
#191     jit_insns:OK
Summary: 1/30 PASSED, 0 SKIPPED, 0/0 FAILED

$ sudo ./test_progs -a jit_insns_blinded -b jit_insns_blinded/ldst_offsets
#192/1   jit_insns_blinded/alu_imm:OK
#192/2   jit_insns_blinded/alu_imm_regs:OK
#192/3   jit_insns_blinded/alu_edges:OK
#192/4   jit_insns_blinded/div_const:OK
#192/5   jit_insns_blinded/shifts:OK
#192/6   jit_insns_blinded/xadd_chain:OK
#192/7   jit_insns_blinded/ld_imm64:OK
#192/8   jit_insns_blinded/jmp_imm:OK
#192/9   jit_insns_blinded/jmp_edges:OK
#192/10  jit_insns_blinded/ldst_zero_off:OK
#192/12  jit_insns_blinded/jset_imm:OK
#192/13  jit_insns_blinded/cmp_imm:OK
#192/14  jit_insns_blinded/alu_consts:OK
#192     jit_insns_blinded:OK
Summary: 1/13 PASSED, 0 SKIPPED, 0/0 FAILED

Thanks,
Tiezhu


      reply	other threads:[~2026-10-17 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  8:10 [PATCH v3 0/3] LoongArch: BPF: Refine move_imm() and optimize 32-bit operations Tiezhu Yang
2026-10-16  8:10 ` [PATCH v3 1/3] LoongArch: Add CPUCFG2 DIV32 feature detection Tiezhu Yang
2026-10-16  8:10 ` [PATCH v3 2/3] LoongArch: BPF: Clean up and decouple is32 parameter from move_imm() Tiezhu Yang
2026-10-16  8:10 ` [PATCH v3 3/3] LoongArch: BPF: Optimize 32-bit operations using native instructions Tiezhu Yang
2026-10-16 15:18   ` Alexei Starovoitov
2026-10-17 10:58     ` Tiezhu Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c6a049d4-80c1-c3a4-e4de-87b582864e01@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=hengqi.chen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®