[dpdk-dev] [PATCH] crypto/virtio: alloc private data by NUMA affinity

Akhil Goyal akhil.goyal at nxp.com
Fri Oct 4 14:00:14 CEST 2019


Hi Jay,

Could you please review this change.

Thanks,
Akhil

> 
> 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 <xiao.w.wang at intel.com>
> ---
>  drivers/crypto/virtio/virtio_cryptodev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/virtio/virtio_cryptodev.c
> b/drivers/crypto/virtio/virtio_cryptodev.c
> index f16bdfe57..4af479f54 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];
> --
> 2.15.1



More information about the dev mailing list