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/virtio/virtio_cryptodev.c | 12 ++++++------
 drivers/crypto/virtio/virtio_cryptodev.h |  2 +-
 drivers/crypto/virtio/virtqueue.c        |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/crypto/virtio/virtio_cryptodev.c 
b/drivers/crypto/virtio/virtio_cryptodev.c
index d0fe21947c..9f1df7be50 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -30,7 +30,7 @@ static void virtio_crypto_dev_stats_reset(struct 
rte_cryptodev *dev);
 static int virtio_crypto_qp_setup(struct rte_cryptodev *dev,
                uint16_t queue_pair_id,
                const struct rte_cryptodev_qp_conf *qp_conf,
-               int socket_id);
+               int numa_id);
 static int virtio_crypto_qp_release(struct rte_cryptodev *dev,
                uint16_t queue_pair_id);
 static void virtio_crypto_dev_free_mbufs(struct rte_cryptodev *dev);
@@ -90,7 +90,7 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
                int queue_type,
                uint16_t vtpci_queue_idx,
                uint16_t nb_desc,
-               int socket_id,
+               int numa_id,
                struct virtqueue **pvq)
 {
        char vq_name[VIRTQUEUE_MAX_NAME_SZ];
@@ -144,7 +144,7 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
                vq = hw->vqs[vtpci_queue_idx];
        else
                vq = virtcrypto_queue_alloc(hw, vtpci_queue_idx, nb_desc,
-                               socket_id, vq_name);
+                               numa_id, vq_name);
        if (vq == NULL) {
                VIRTIO_CRYPTO_INIT_LOG_ERR("Can not allocate virtqueue");
                return -ENOMEM;
@@ -162,7 +162,7 @@ virtio_crypto_queue_setup(struct rte_cryptodev *dev,
                                        nb_desc,
                                        sizeof(struct virtio_crypto_op_cookie),
                                        RTE_CACHE_LINE_SIZE, 0,
-                                       NULL, NULL, NULL, NULL, socket_id,
+                                       NULL, NULL, NULL, NULL, numa_id,
                                        0);
                if (!vq->mpool) {
                        VIRTIO_CRYPTO_DRV_LOG_ERR("Virtio Crypto PMD "
@@ -298,7 +298,7 @@ virtio_crypto_dev_stats_reset(struct rte_cryptodev *dev)
 static int
 virtio_crypto_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id,
                const struct rte_cryptodev_qp_conf *qp_conf,
-               int socket_id)
+               int numa_id)
 {
        int ret;
        struct virtqueue *vq;
@@ -310,7 +310,7 @@ virtio_crypto_qp_setup(struct rte_cryptodev *dev, uint16_t 
queue_pair_id,
                return 0;
 
        ret = virtio_crypto_queue_setup(dev, VTCRYPTO_DATAQ, queue_pair_id,
-                       qp_conf->nb_descriptors, socket_id, &vq);
+                       qp_conf->nb_descriptors, numa_id, &vq);
        if (ret < 0) {
                VIRTIO_CRYPTO_INIT_LOG_ERR(
                        "virtio crypto data queue initialization failed");
diff --git a/drivers/crypto/virtio/virtio_cryptodev.h 
b/drivers/crypto/virtio/virtio_cryptodev.h
index 075b5ff444..2ca1e77492 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.h
+++ b/drivers/crypto/virtio/virtio_cryptodev.h
@@ -63,7 +63,7 @@ int virtio_crypto_queue_setup(struct rte_cryptodev *dev,
                int queue_type,
                uint16_t vtpci_queue_idx,
                uint16_t nb_desc,
-               int socket_id,
+               int numa_id,
                struct virtqueue **pvq);
 
 void virtio_crypto_queue_release(struct virtqueue *vq);
diff --git a/drivers/crypto/virtio/virtqueue.c 
b/drivers/crypto/virtio/virtqueue.c
index 061aa09dbe..d76e0a0cf5 100644
--- a/drivers/crypto/virtio/virtqueue.c
+++ b/drivers/crypto/virtio/virtqueue.c
@@ -190,7 +190,7 @@ virtcrypto_queue_alloc(struct virtio_crypto_hw *hw, 
uint16_t index, uint16_t num
        size = sizeof(*vq) + num * sizeof(struct vq_desc_extra);
        size = RTE_ALIGN_CEIL(size, RTE_CACHE_LINE_SIZE);
 
-       vq = rte_zmalloc_socket(name, size, RTE_CACHE_LINE_SIZE, node);
+       vq = rte_zmalloc_numa(name, size, RTE_CACHE_LINE_SIZE, node);
        if (vq == NULL) {
                PMD_INIT_LOG(ERR, "can not allocate vq");
                return NULL;
-- 
2.55.0

Reply via email to