From: Vishwanath Seshagiri <vishs@meta.com>
To: Paolo Abeni <pabeni@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>
Cc: "Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>, "David Wei" <dw@davidwei.uk>,
"Matteo Croce" <technoboy85@gmail.com>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
netdev@vger.kernel.org, virtualization@lists.linux.dev,
linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH net-next v10] virtio_net: add page_pool support for buffer allocation
Date: Sat, 7 Mar 2026 19:27:22 +0530 [thread overview]
Message-ID: <be848f0c-be28-47ca-a86c-e53e1f6a996e@meta.com> (raw)
In-Reply-To: <dba095d1-6fb7-4a3c-b889-c721e66c7b0d@redhat.com>
On 3/5/26 5:33 PM, Paolo Abeni wrote:
>
> As noted by Micheal in the previous revision the above will
> skb->truesize under accounting. That is not safe and at least need a
> solid explaination, which is still missing.
I misunderstood Michael's v9 feedback as a variable naming issue and
only added a separate alloc_len to avoid clobbering len, without
actually propagating the real allocation size to truesize.
page_pool_alloc_va() can return more than requested when the remaining
page fragment is too small for another allocation. The small buffer path
ignores this and reconstructs buflen from constants in
receive_small_build_skb(), so build_skb() sets truesize based on the
requested size, not the actual allocation.
I'll fix this in v11 by encoding the actual allocation size in the ctx
pointer (similar to how the mergeable path uses mergeable_len_to_ctx)
so receive_small_build_skb() can pass the real buflen to build_skb().
>
> /P
>
next prev parent reply other threads:[~2026-03-07 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 7:42 [PATCH net-next v10] virtio_net: add page_pool support for buffer allocation Vishwanath Seshagiri
2026-03-05 12:03 ` Paolo Abeni
2026-03-07 13:57 ` Vishwanath Seshagiri [this message]
2026-03-05 12:38 ` Michael S. Tsirkin
[not found] ` <fc4e8dcf-ba26-4170-9405-eb4a2728d92f@meta.com>
2026-03-07 15:00 ` Vishwanath Seshagiri
2026-03-08 12:09 ` Vishwanath Seshagiri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=be848f0c-be28-47ca-a86c-e53e1f6a996e@meta.com \
--to=vishs@meta.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jasowang@redhat.com \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=technoboy85@gmail.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox