From: Xiao Wang Date: Wed, 4 Sep 2019 13:21:51 +0000 (+0800) Subject: crypto/virtio: allocate private data by NUMA affinity X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=933f42eac9fcaf37f4063c38bd9546956cd857c9;p=dpdk.git crypto/virtio: allocate private data by NUMA affinity It's better to allocate device private data on the same NUMA node with device, rather than with the main thread. This helps avoid cross-NUMA access for worker thread. Signed-off-by: Xiao Wang Reviewed-by: Jay Zhou --- diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c index f16bdfe57e..4af479f544 100644 --- a/drivers/crypto/virtio/virtio_cryptodev.c +++ b/drivers/crypto/virtio/virtio_cryptodev.c @@ -1441,7 +1441,7 @@ crypto_virtio_pci_probe( { struct rte_cryptodev_pmd_init_params init_params = { .name = "", - .socket_id = rte_socket_id(), + .socket_id = pci_dev->device.numa_node, .private_data_size = sizeof(struct virtio_crypto_hw) }; char name[RTE_CRYPTODEV_NAME_MAX_LEN];