> From: Andrew Boyer [mailto:andrew.bo...@amd.com]
> Sent: Friday, 16 February 2024 18.04
> 
> Use rte_mempool_virt2iova(), which uses arithmetic based on the mempool
> state, rather than rte_mem_virt2iova(), which uses syscalls to look at
> the proc filesystem. This speeds up pool create by more than 90%.
> 
> Signed-off-by: Andrew Boyer <andrew.bo...@amd.com>
> ---
>  lib/cryptodev/rte_cryptodev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/cryptodev/rte_cryptodev.c
> b/lib/cryptodev/rte_cryptodev.c
> index b233c0ecd7..886eb7adc4 100644
> --- a/lib/cryptodev/rte_cryptodev.c
> +++ b/lib/cryptodev/rte_cryptodev.c
> @@ -2573,7 +2573,7 @@ rte_crypto_op_init(struct rte_mempool *mempool,
> 
>       __rte_crypto_op_reset(op, type);
> 
> -     op->phys_addr = rte_mem_virt2iova(_op_data);
> +     op->phys_addr = rte_mempool_virt2iova(_op_data);
>       op->mempool = mempool;
>  }
> 
> --
> 2.17.1

Reviewed-by: Morten Brørup <m...@smartsharesystems.com>

Reply via email to