summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDipayaan Roy <dipayanroy@linux.microsoft.com>2026-03-24 11:14:28 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-04-11 14:29:24 +0200
commite3b81237ce8e3c91924f954b4ab73c9a20ef14c7 (patch)
treeaa4939d7cb58eeaf5bab4258675777e5285f5d2d /include
parent5bb3caf0bbfb56f1a00d2af072ac3d8395a3b9ef (diff)
net: mana: Fix RX skb truesize accounting
[ Upstream commit f73896b4197ed53cf0894657c899265ef7c86b7a ] MANA passes rxq->alloc_size to napi_build_skb() for all RX buffers. It is correct for fragment-backed RX buffers, where alloc_size matches the actual backing allocation used for each packet buffer. However, in the non-fragment RX path mana allocates a full page, or a higher-order page, per RX buffer. In that case alloc_size only reflects the usable packet area and not the actual backing memory. This causes napi_build_skb() to underestimate the skb backing allocation in the single-buffer RX path, so skb->truesize is derived from a value smaller than the real RX buffer allocation. Fix this by updating alloc_size in the non-fragment RX path to the actual backing allocation size before it is passed to napi_build_skb(). Fixes: 730ff06d3f5c ("net: mana: Use page pool fragments for RX buffers instead of full pages to improve memory efficiency.") Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Link: https://patch.msgid.link/acLUhLpLum6qrD/N@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions