]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: netpoll: flush skb pool during cleanup
authorBreno Leitao <leitao@debian.org>
Thu, 14 Nov 2024 11:00:12 +0000 (03:00 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 16 Nov 2024 00:25:34 +0000 (16:25 -0800)
commit6c59f16f1770481a6ee684720ec55b1e38b3a4b2
tree34a990262e956e5aabfeee929fb8ebec9df28689
parent221a9c1df790fa711d65daf5ba05d0addc279153
net: netpoll: flush skb pool during cleanup

The netpoll subsystem maintains a pool of 32 pre-allocated SKBs per
instance, but these SKBs are not freed when the netpoll user is brought
down. This leads to memory waste as these buffers remain allocated but
unused.

Add skb_pool_flush() to properly clean up these SKBs when netconsole is
terminated, improving memory efficiency.

Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20241114-skb_buffers_v2-v3-2-9be9f52a8b69@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/netpoll.c