Commit 72ecf75c authored by Bibo Mao's avatar Bibo Mao Committed by Michael S. Tsirkin
Browse files

crypto: virtio: Replace package id with numa node id



With multiple virtio crypto devices supported with different NUMA
nodes, when crypto session is created, it will search virtio crypto
device with the same numa node of current CPU.

Here API topology_physical_package_id() is replaced with cpu_to_node()
since package id is physical concept, and one package id have multiple
memory numa id.

Signed-off-by: default avatarBibo Mao <maobibo@loongson.cn>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Message-Id: <20260113030556.3522533-4-maobibo@loongson.cn>
parent a389d431
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ static inline int virtio_crypto_get_current_node(void)
	int cpu, node;

	cpu = get_cpu();
	node = topology_physical_package_id(cpu);
	node = cpu_to_node(cpu);
	put_cpu();

	return node;