lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b064644-bd21-445f-b46a-cfe82fe184db@grimberg.me>
Date: Mon, 30 Dec 2024 10:31:10 +0200
From: Sagi Grimberg <sagi@...mberg.me>
To: Yury Norov <yury.norov@...il.com>, linux-nvme@...ts.infradead.org,
 linux-kernel@...r.kernel.org, Keith Busch <kbusch@...nel.org>,
 Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@....de>
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [PATCH 10/14] nvme-tcp: switch nvme_tcp_set_queue_io_cpu() to
 using cpumask_next_wrap()




On 28/12/2024 20:49, Yury Norov wrote:
> Calling cpumask_next_wrap_old() with starting CPU == -1 effectively
> is the same as request to find next CPU, wrapping around if needed.
>
> cpumask_next_wrap() is the proper replacement for that.
>
> Signed-off-by: Yury Norov <yury.norov@...il.com>
> ---
>   drivers/nvme/host/tcp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> index 054904376c3c..088101c57f53 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -1578,7 +1578,7 @@ static void nvme_tcp_set_queue_io_cpu(struct nvme_tcp_queue *queue)
>   	if (wq_unbound)
>   		queue->io_cpu = WORK_CPU_UNBOUND;
>   	else
> -		queue->io_cpu = cpumask_next_wrap_old(n - 1, cpu_online_mask, -1, false);
> +		queue->io_cpu = cpumask_next_wrap(n - 1, cpu_online_mask);
>   }
>   
>   static void nvme_tcp_tls_done(void *data, int status, key_serial_t pskid)

Acked-by: Sagi Grimberg <sagi@...mberg.me>

Note that this will conflict with another outstanding patch:
https://lore.kernel.org/linux-nvme/20241224120457.576100-1-sagi@grimberg.me/T/#u 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ