Re: [PATCH bpf-next v4] selftests/bpf: Add LPM trie microbenchmarks
From: Matt Fleming
Date: Wed Aug 27 2025 - 07:28:04 EST
On Wed, Aug 27, 2025 at 12:50 AM Alexei Starovoitov
<alexei.starovoitov@xxxxxxxxx> wrote:
>
> On Tue, Aug 26, 2025 at 6:12 AM Matt Fleming <matt@xxxxxxxxxxxxxxxx> wrote:
> >
> > +static int baseline(__u32 index, __u32 *unused)
> > +{
> > + struct trie_key key;
> > + __s64 blackbox;
> > +
> > + generate_key(&key);
> > + /* Avoid compiler optimizing out the modulo */
> > + barrier_var(blackbox);
> > + blackbox = READ_ONCE(key.data);
>
> Overall looks good, but gcc-bpf found an actual issue.
Thanks. I'll submit a v5 with a fix shortly.