]> git.baikalelectronics.ru Git - kernel.git/commit
udp: Refactor udp_read_skb()
authorPeilin Ye <peilin.ye@bytedance.com>
Fri, 23 Sep 2022 04:59:13 +0000 (21:59 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Sep 2022 18:00:19 +0000 (11:00 -0700)
commit7fc88b4e05aa60cb3d497d3680109a08b3309fb9
treea41df2706cf3b9ca01888b07d6b9fd63ba8f6944
parent5d2712f33c19f3505fde807985e6461ed085b0bc
udp: Refactor udp_read_skb()

Delete the unnecessary while loop in udp_read_skb() for readability.
Additionally, since recv_actor() cannot return a value greater than
skb->len (see sk_psock_verdict_recv()), remove the redundant check.

Suggested-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Peilin Ye <peilin.ye@bytedance.com>
Link: https://lore.kernel.org/r/343b5d8090a3eb764068e9f1d392939e2b423747.1663909008.git.peilin.ye@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/udp.c