From: Jiong Wang <jiong.wang@netronome.com>
To: Luke Nelson <luke.r.nels@gmail.com>, Song Liu <liu.song.a23@gmail.com>
Cc: "Song Liu" <songliubraving@fb.com>,
"Albert Ou" <aou@eecs.berkeley.edu>, bpf <bpf@vger.kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Björn Töpel" <bjorn.topel@gmail.com>,
"Palmer Dabbelt" <palmer@sifive.com>,
"Alexei Starovoitov" <ast@kernel.org>,
"open list" <linux-kernel@vger.kernel.org>,
Networking <netdev@vger.kernel.org>, "Yonghong Song" <yhs@fb.com>,
linux-riscv@lists.infradead.org,
"Martin KaFai Lau" <kafai@fb.com>, "Xi Wang" <xi.wang@gmail.com>
Subject: Re: [PATCH 1/2] bpf, riscv: fix bugs in JIT for 32-bit ALU operations
Date: Fri, 31 May 2019 08:22:45 +0100 [thread overview]
Message-ID: <87d0jzgkai.fsf@netronome.com> (raw)
In-Reply-To: <CAPhsuW7rOzyJTac7d9PPHeWW39Hu5pV6Mk0xJr8jyr0HH=-W2A@mail.gmail.com>
Song Liu writes:
> On Thu, May 30, 2019 at 3:34 PM Luke Nelson <luke.r.nels@gmail.com> wrote:
>>
>> On Thu, May 30, 2019 at 1:53 PM Song Liu <liu.song.a23@gmail.com> wrote:
>> >
>> > This is a little messy. How about we introduce some helper function
>> > like:
>> >
>> > /* please find a better name... */
>> > emit_32_or_64(bool is64, const u32 insn_32, const u32 inst_64, struct
>> > rv_jit_context *ctx)
>> > {
>> > if (is64)
>> > emit(insn_64, ctx);
>> > else {
>> > emit(insn_32, ctx);
>> > rd = xxxx;
>> > emit_zext_32(rd, ctx);
>> > }
>> > }
>>
>> This same check is used throughout the file, maybe clean it up in a
>> separate patch?
We also need to enable the recent 32-bit opt (on bpf-next) on these missing
insns, like what has been done at:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=66d0d5a854a6625974e7de4b874e7934988b0ef8
Perhaps the best way is to wait this patch merged back to bpf-next, then we
do two patches, the first one to enable the opt, the second one then do the
re-factor. I guess this could avoid some code conflict.
Regards,
Jiong
>
> Yes, let's do follow up patch.
>
> Thanks,
> Song
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2019-05-31 7:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 19:07 [PATCH 1/2] bpf, riscv: fix bugs in JIT for 32-bit ALU operations Luke Nelson
2019-05-30 19:08 ` [PATCH 2/2] bpf: test_bpf: add tests for upper bits of 32-bit operations Luke Nelson
2019-05-30 20:30 ` Jiong Wang
2019-05-30 20:53 ` [PATCH 1/2] bpf, riscv: fix bugs in JIT for 32-bit ALU operations Song Liu
2019-05-30 22:34 ` Luke Nelson
2019-05-30 23:08 ` Song Liu
2019-05-31 7:22 ` Jiong Wang [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=87d0jzgkai.fsf@netronome.com \
--to=jiong.wang@netronome.com \
--cc=aou@eecs.berkeley.edu \
--cc=ast@kernel.org \
--cc=bjorn.topel@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=liu.song.a23@gmail.com \
--cc=luke.r.nels@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=palmer@sifive.com \
--cc=songliubraving@fb.com \
--cc=xi.wang@gmail.com \
--cc=yhs@fb.com \
/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;
as well as URLs for NNTP newsgroup(s).