[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zy1priZk_LjbJwVV@mini-arch>
Date: Thu, 7 Nov 2024 17:30:22 -0800
From: Stanislav Fomichev <stfomichev@...il.com>
To: Mina Almasry <almasrymina@...gle.com>
Cc: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
"David S. Miller" <davem@...emloft.net>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Jonathan Corbet <corbet@....net>,
Yi Lai <yi1.lai@...ux.intel.com>,
Stanislav Fomichev <sdf@...ichev.me>
Subject: Re: [PATCH net v2 2/2] net: clarify SO_DEVMEM_DONTNEED behavior in
documentation
On 11/07, Mina Almasry wrote:
> Document new behavior when the number of frags passed is too big.
>
> Signed-off-by: Mina Almasry <almasrymina@...gle.com>
> ---
> Documentation/networking/devmem.rst | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/Documentation/networking/devmem.rst b/Documentation/networking/devmem.rst
> index a55bf21f671c..d95363645331 100644
> --- a/Documentation/networking/devmem.rst
> +++ b/Documentation/networking/devmem.rst
> @@ -225,6 +225,15 @@ The user must ensure the tokens are returned to the kernel in a timely manner.
> Failure to do so will exhaust the limited dmabuf that is bound to the RX queue
> and will lead to packet drops.
>
> +The user must pass no more than 128 tokens, with no more than 1024 total frags
> +among the token->token_count across all the tokens. If the user provides more
> +than 1024 frags, the kernel will free up to 1024 frags and return early.
> +
> +The kernel returns the number of actual frags freed. The number of frags freed
> +can be less than the tokens provided by the user in case of:
> +
[..]
> +(a) an internal kernel leak bug.
If you're gonna respin, might be worth mentioning that the dmesg
will contain a warning in case of a leak?
Powered by blists - more mailing lists