udp: introduce __sk_mem_schedule() usage
authorJason Xing <kernelxing@tencent.com>
Wed, 8 Mar 2023 02:11:53 +0000 (10:11 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Mar 2023 07:32:12 +0000 (23:32 -0800)
commitfd9c31f834416e3060061dbcb45ababaa25cdfe2
tree017bbd9b05dd8793eedbe4d206ce12a1ab0090e4
parentd0928c1c5b3db0cd80e867eb49f171f096f03b8c
udp: introduce __sk_mem_schedule() usage

Keep the accounting schema consistent across different protocols
with __sk_mem_schedule(). Besides, it adjusts a little bit on how
to calculate forward allocated memory compared to before. After
applied this patch, we could avoid receive path scheduling extra
amount of memory.

Link: https://lore.kernel.org/lkml/20230221110344.82818-1-kerneljasonxing@gmail.com/
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20230308021153.99777-1-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/udp.c