From: Chengwen Feng <[email protected]> Rename socket_id parameters, internal structure fields, variables and comments to the NUMA node terminology, and switch calls to the NUMA-named APIs.
Signed-off-by: Chengwen Feng <[email protected]> --- drivers/crypto/null/null_crypto_pmd.c | 4 ++-- drivers/crypto/null/null_crypto_pmd_ops.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c index 6db9deaee8..a32eca5514 100644 --- a/drivers/crypto/null/null_crypto_pmd.c +++ b/drivers/crypto/null/null_crypto_pmd.c @@ -186,7 +186,7 @@ cryptodev_null_probe(struct rte_vdev_device *dev) struct rte_cryptodev_pmd_init_params init_params = { "", sizeof(struct null_crypto_private), - rte_socket_id(), + rte_numa_id(), RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS }; const char *name, *args; @@ -237,7 +237,7 @@ static struct cryptodev_driver null_crypto_drv; RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv); RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD, "max_nb_queue_pairs=<int> " - "socket_id=<int>"); + "numa_id=<int>"); RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver, cryptodev_driver_id); RTE_LOG_REGISTER_DEFAULT(null_logtype_driver, INFO); diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c index f07e9c2ea0..27bc9231b3 100644 --- a/drivers/crypto/null/null_crypto_pmd_ops.c +++ b/drivers/crypto/null/null_crypto_pmd_ops.c @@ -161,7 +161,7 @@ null_crypto_pmd_qp_set_unique_name(struct rte_cryptodev *dev, /** Create a ring to place process packets on */ static struct rte_ring * null_crypto_pmd_qp_create_processed_pkts_ring(struct null_crypto_qp *qp, - unsigned ring_size, int socket_id) + unsigned int ring_size, int numa_id) { struct rte_ring *r; @@ -180,7 +180,7 @@ null_crypto_pmd_qp_create_processed_pkts_ring(struct null_crypto_qp *qp, return NULL; } - return rte_ring_create(qp->name, ring_size, socket_id, + return rte_ring_create(qp->name, ring_size, numa_id, RING_F_SP_ENQ | RING_F_SC_DEQ); } @@ -188,7 +188,7 @@ null_crypto_pmd_qp_create_processed_pkts_ring(struct null_crypto_qp *qp, static int null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, const struct rte_cryptodev_qp_conf *qp_conf, - int socket_id) + int numa_id) { struct null_crypto_private *internals = dev->data->dev_private; struct null_crypto_qp *qp; @@ -206,8 +206,8 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, null_crypto_pmd_qp_release(dev, qp_id); /* Allocate the queue pair data structure. */ - qp = rte_zmalloc_socket("Null Crypto PMD Queue Pair", sizeof(*qp), - RTE_CACHE_LINE_SIZE, socket_id); + qp = rte_zmalloc_numa("Null Crypto PMD Queue Pair", sizeof(*qp), + RTE_CACHE_LINE_SIZE, numa_id); if (qp == NULL) { NULL_LOG(ERR, "Failed to allocate queue pair memory"); return (-ENOMEM); @@ -225,7 +225,7 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, } qp->processed_pkts = null_crypto_pmd_qp_create_processed_pkts_ring(qp, - qp_conf->nb_descriptors, socket_id); + qp_conf->nb_descriptors, numa_id); if (qp->processed_pkts == NULL) { NULL_LOG(ERR, "Failed to create unique name for null " "crypto device"); -- 2.55.0

