Re: [PATCH net-next v5] net: avoid one loop iteration in __skb_splice_bits

From: Willem de Bruijn
Date: Tue Aug 19 2025 - 09:58:54 EST


Pengtao He wrote:
> If *len is equal to 0 at the beginning of __splice_segment
> it returns true directly. But when decreasing *len from
> a positive number to 0 in __splice_segment, it returns false.
> The __skb_splice_bits needs to call __splice_segment again.
>
> Recheck *len if it changes, return true in time.
> Reduce unnecessary calls to __splice_segment.
>
> Signed-off-by: Pengtao He <hept.hept.hept@xxxxxxxxx>

Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>