Re: [RFC bpf-next v1 3/7] bpf: Support pulling non-linear xdp data

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

 



On Mon, Aug 25, 2025 at 3:29 PM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Mon, 25 Aug 2025 15:23:23 -0700 Amery Hung wrote:
> > > > +     if (!len)
> > > > +             len = xdp_get_buff_len(xdp);
> > >
> > > Why not return -EINVAL here for len=0?
> > >
> >
> > I try to mirror the behavior of bpf_skb_pull_data() to reduce confusion here.
>
> Different question for the same LoC :)
>
> Why not
>
>         if (!len)
>                 len = buff_len;
> ?
> Or perhaps:
>
>         len = len ?: buf_len;

... Ope. Thanks for catching this. I will fix it in the next iteration.





[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