Re: [PATCH net v2] net: clear the dst when changing skb protocol

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

 



On Mon, 09 Jun 2025 09:50:30 -0400 Willem de Bruijn wrote:
> > > +       if (ret)
> > > +               return ret;
> > > +
> > >         bpf_compute_data_pointers(skb);
> > > -       return ret;  
> 
> I wonder whether that unconditional call to bpf_compute_data_pointers
> even if ret was there for a reason.
> 
> From reviewing the bpf_skb_proto_xlat error paths, it does seem safe
> to remove it. The cases where an error may be returned after the skb
> is modified only modify the skb in terms of headroom, not headlen.

I should have mentioned, I looked around and also concluded this
unconditional recompute was purely aesthetic.




[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