[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-r9nxBna_WrOckQ@mini-arch>
Date: Mon, 31 Mar 2025 13:39:59 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
ap420073@...il.com, asml.silence@...il.com, almasrymina@...gle.com,
dw@...idwei.uk, sdf@...ichev.me
Subject: Re: [PATCH net 1/2] net: move mp dev config validation to
__net_mp_open_rxq()
On 03/31, Jakub Kicinski wrote:
> devmem code performs a number of safety checks to avoid having
> to reimplement all of them in the drivers. Move those to
> __net_mp_open_rxq() and reuse that function for binding to make
> sure that io_uring ZC also benefits from them.
>
> While at it rename the queue ID variable to rxq_idx in
> __net_mp_open_rxq(), we touch most of the relevant lines.
>
> Fixes: 6e18ed929d3b ("net: add helpers for setting a memory provider on an rx queue")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: ap420073@...il.com
> CC: almasrymina@...gle.com
> CC: asml.silence@...il.com
> CC: dw@...idwei.uk
> CC: sdf@...ichev.me
> ---
> include/net/page_pool/memory_provider.h | 6 +++
> net/core/devmem.c | 52 ++++++-------------------
> net/core/netdev-genl.c | 6 ---
> net/core/netdev_rx_queue.c | 49 +++++++++++++++++------
> 4 files changed, 55 insertions(+), 58 deletions(-)
>
> diff --git a/include/net/page_pool/memory_provider.h b/include/net/page_pool/memory_provider.h
> index b3e665897767..3724ac3c9fb2 100644
> --- a/include/net/page_pool/memory_provider.h
> +++ b/include/net/page_pool/memory_provider.h
> @@ -6,6 +6,7 @@
> #include <net/page_pool/types.h>
>
> struct netdev_rx_queue;
> +struct netlink_ext_ack;
> struct sk_buff;
>
> struct memory_provider_ops {
> @@ -24,8 +25,13 @@ void net_mp_niov_clear_page_pool(struct net_iov *niov);
>
> int net_mp_open_rxq(struct net_device *dev, unsigned ifq_idx,
> struct pp_memory_provider_params *p);
> +int __net_mp_open_rxq(struct net_device *dev, unsigned int ifq_idx,
> + const struct pp_memory_provider_params *p,
> + struct netlink_ext_ack *extack);
Nit: you keep using ifq_idx here, but in the .c file you rename it to
rxq_idx. Not worth the respin..
Acked-by: Stanislav Fomichev <sdf@...ichev.me>
Powered by blists - more mailing lists