[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250115171257.04289cc9@kernel.org>
Date: Wed, 15 Jan 2025 17:12:57 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: David Wei <dw@...idwei.uk>
Cc: io-uring@...r.kernel.org, netdev@...r.kernel.org, Jens Axboe
<axboe@...nel.dk>, Pavel Begunkov <asml.silence@...il.com>, Paolo Abeni
<pabeni@...hat.com>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jesper Dangaard Brouer <hawk@...nel.org>, David
Ahern <dsahern@...nel.org>, Mina Almasry <almasrymina@...gle.com>,
Stanislav Fomichev <stfomichev@...il.com>, Joe Damato <jdamato@...tly.com>,
Pedro Tammela <pctammela@...atatu.com>
Subject: Re: [PATCH net-next v10 18/22] io_uring/zcrx: set pp memory
provider for an rx queue
On Wed, 8 Jan 2025 14:06:39 -0800 David Wei wrote:
> + ASSERT_RTNL();
> +
> + if (ifq_idx >= dev->num_rx_queues)
_real_ rx queues.
We don't allow configuring disabled queues today.
> + return -EINVAL;
> + ifq_idx = array_index_nospec(ifq_idx, dev->num_rx_queues);
> +
> + rxq = __netif_get_rx_queue(ifq->dev, ifq_idx);
> + if (rxq->mp_params.mp_priv)
> + return -EEXIST;
> +
> + ifq->if_rxq = ifq_idx;
> + rxq->mp_params.mp_ops = &io_uring_pp_zc_ops;
> + rxq->mp_params.mp_priv = ifq;
> + ret = netdev_rx_queue_restart(ifq->dev, ifq->if_rxq);
> + if (ret)
> + goto fail;
Hm. Could you move all this (and the rtnl_lock() in the caller)
to a helper under net/ ? Or does something io_uring-y here need
to be protected by rtnl_lock()?
Powered by blists - more mailing lists