Re: [PATCH net-next v10 18/22] io_uring/zcrx: set pp memory provider for an rx queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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()?




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux