Skip to content

Commit 72ecf75

Browse files
bibo-maomstsirkin
authored andcommitted
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: Bibo Mao <maobibo@loongson.cn> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20260113030556.3522533-4-maobibo@loongson.cn>
1 parent a389d43 commit 72ecf75

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/crypto/virtio/virtio_crypto_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static inline int virtio_crypto_get_current_node(void)
135135
int cpu, node;
136136

137137
cpu = get_cpu();
138-
node = topology_physical_package_id(cpu);
138+
node = cpu_to_node(cpu);
139139
put_cpu();
140140

141141
return node;

0 commit comments

Comments
 (0)