Re: [PATCH bpf-next] libbpf: Reduce bpf_core_apply_relo_insn() stack usage.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 3, 2021 at 1:22 PM Andrii Nakryiko
<andrii.nakryiko@xxxxxxxxx> wrote:
> > > > -                            struct bpf_core_cand_list *cands)
> > > > +                            struct bpf_core_cand_list *cands,
> > > > +                            struct bpf_core_spec *specs)
> > >
> > > same here, let's pass three separate arguments instead of having to
> > > remember which array element corresponds to which (local vs cand vs
> > > targ). It doesn't prevent kernel-side from using an array and just
> > > passing pointers.
> >
> > I don't understand the suggestion.
> > There is nothing to remember. It could have been just raw bytes
> > of appropriate size. It's temp data.
> > Passing them as 3 different args would make an impression
> > that they're actually meaningful. They're not. It's a scratch space.
>
> Ok, fair enough. I've renamed specs to specs_scratch to make this more
> explicit and pushed to bpf-next.

Yep. Such name makes sense. Thanks



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux