Commit 7a3dbd67 authored by Pengtao He's avatar Pengtao He Committed by Giuliano Procida
Browse files

FROMGIT: net: avoid one loop iteration in __skb_splice_bits



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: default avatarPengtao He <hept.hept.hept@gmail.com>
Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250819021551.8361-1-hept.hept.hept@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>

(cherry picked from commit 8f2c72f2
 https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git

 main)
Change-Id: I7dc42a1ce52c74b947b5bd45fe1aef2a94898b51
Signed-off-by: default avatarPengtao He <hepengtao@xiaomi.com>
(cherry picked from commit e12ac62d)
Bug: 440430545
Signed-off-by: default avatarGiuliano Procida <gprocida@google.com>
parent 4d782efa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment