summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDipayaan Roy <dipayanroy@linux.microsoft.com>2026-03-24 21:14:28 +0300
committerJakub Kicinski <kuba@kernel.org>2026-03-27 04:57:07 +0300
commitf73896b4197ed53cf0894657c899265ef7c86b7a (patch)
treeee13d1585eaf160302a1444a3fa9425bee3abb0e /include
parent629ec78ef8608d955ce217880cdc3e1873af3a15 (diff)
downloadlinux-f73896b4197ed53cf0894657c899265ef7c86b7a.tar.xz
net: mana: Fix RX skb truesize accounting
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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions