[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250116181349.623471eb@kernel.org>
Date: Thu, 16 Jan 2025 18:13:49 -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 v11 17/21] io_uring/zcrx: set pp memory
provider for an rx queue
On Thu, 16 Jan 2025 15:16:59 -0800 David Wei wrote:
> +static void io_close_queue(struct io_zcrx_ifq *ifq)
> +{
> + struct net_device *netdev;
> + netdevice_tracker netdev_tracker;
> + struct pp_memory_provider_params p = {
> + .mp_ops = &io_uring_pp_zc_ops,
> + .mp_priv = ifq,
> + };
> +
> + if (ifq->if_rxq == -1)
> + return;
> +
> + spin_lock(&ifq->lock);
> + netdev = ifq->netdev;
> + netdev_tracker = ifq->netdev_tracker;
> + ifq->netdev = NULL;
> + spin_unlock(&ifq->lock);
> +
> + if (netdev)
> + net_mp_close_rxq(netdev, ifq->if_rxq, &p);
> + ifq->if_rxq = -1;
> +}
Did you mean to call netdev_put() somewhere here? :S
Powered by blists - more mailing lists