summaryrefslogtreecommitdiff
path: root/scripts/basic/fixdep.c
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@kernel.org>2025-02-10 16:52:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-21 14:01:18 +0100
commit1bba1d042107167164a0ae3a843fdf650ab005d7 (patch)
treeb7df24f9e50fbd6b5fbe1557188e0b6f104739b5 /scripts/basic/fixdep.c
parent1dfb37ec8f012a8466b2e624b35d1b411dd10b01 (diff)
downloadlinux-1bba1d042107167164a0ae3a843fdf650ab005d7.tar.gz
linux-1bba1d042107167164a0ae3a843fdf650ab005d7.tar.bz2
linux-1bba1d042107167164a0ae3a843fdf650ab005d7.zip
net: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases
[ Upstream commit 5db843258de1e4e6b1ef1cbd1797923c9e3de548 ] If the XDP program doesn't result in XDP_PASS then we leak the memory allocated by am65_cpsw_build_skb(). It is pointless to allocate SKB memory before running the XDP program as we would be wasting CPU cycles for cases other than XDP_PASS. Move the SKB allocation after evaluating the XDP program result. This fixes the memleak. A performance boost is seen for XDP_DROP test. XDP_DROP test: Before: 460256 rx/s 0 err/s After: 784130 rx/s 0 err/s Fixes: 8acacc40f733 ("net: ethernet: ti: am65-cpsw: Add minimal XDP support") Signed-off-by: Roger Quadros <rogerq@kernel.org> Link: https://patch.msgid.link/20250210-am65-cpsw-xdp-fixes-v1-1-ec6b1f7f1aca@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/basic/fixdep.c')
0 files changed, 0 insertions, 0 deletions