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/compress/isal/isal_compress_pmd.c     |  4 ++--
 drivers/compress/isal/isal_compress_pmd_ops.c | 24 +++++++++----------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/compress/isal/isal_compress_pmd.c 
b/drivers/compress/isal/isal_compress_pmd.c
index 0e783243a8..f021720a38 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -725,7 +725,7 @@ compdev_isal_probe(struct rte_vdev_device *dev)
 {
        struct rte_compressdev_pmd_init_params init_params = {
                "",
-               rte_socket_id(),
+               rte_numa_id(),
        };
        const char *name, *args;
        int retval;
@@ -753,5 +753,5 @@ static struct rte_vdev_driver compdev_isal_pmd_drv = {
 
 RTE_PMD_REGISTER_VDEV(COMPDEV_NAME_ISAL_PMD, compdev_isal_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD,
-       "socket_id=<int>");
+       "numa_id=<int>");
 RTE_LOG_REGISTER_DEFAULT(isal_logtype_driver, INFO);
diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c 
b/drivers/compress/isal/isal_compress_pmd_ops.c
index be32a4c998..67cf060801 100644
--- a/drivers/compress/isal/isal_compress_pmd_ops.c
+++ b/drivers/compress/isal/isal_compress_pmd_ops.c
@@ -192,7 +192,7 @@ isal_comp_pmd_qp_release(struct rte_compressdev *dev, 
uint16_t qp_id)
 /** Create a ring to place process packets on */
 static struct rte_ring *
 isal_comp_pmd_qp_create_processed_pkts_ring(struct isal_comp_qp *qp,
-               unsigned int ring_size, int socket_id)
+               unsigned int ring_size, int numa_id)
 {
        struct rte_ring *r;
 
@@ -212,7 +212,7 @@ isal_comp_pmd_qp_create_processed_pkts_ring(struct 
isal_comp_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);
 }
 
@@ -234,7 +234,7 @@ struct isal_comp_qp *qp)
 /* Setup a queue pair */
 static int
 isal_comp_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
-               uint32_t max_inflight_ops, int socket_id)
+               uint32_t max_inflight_ops, int numa_id)
 {
        struct isal_comp_qp *qp = NULL;
        int retval;
@@ -244,34 +244,34 @@ isal_comp_pmd_qp_setup(struct rte_compressdev *dev, 
uint16_t qp_id,
                isal_comp_pmd_qp_release(dev, qp_id);
 
        /* Allocate the queue pair data structure. */
-       qp = rte_zmalloc_socket("Isa-l compression PMD Queue Pair", sizeof(*qp),
-                                       RTE_CACHE_LINE_SIZE, socket_id);
+       qp = rte_zmalloc_numa("Isa-l compression PMD Queue Pair", sizeof(*qp),
+                                       RTE_CACHE_LINE_SIZE, numa_id);
        if (qp == NULL) {
                ISAL_PMD_LOG(ERR, "Failed to allocate queue pair memory");
                return (-ENOMEM);
        }
 
        /* Initialize memory for compression stream structure */
-       qp->stream = rte_zmalloc_socket("Isa-l compression stream ",
+       qp->stream = rte_zmalloc_numa("Isa-l compression stream ",
                        sizeof(struct isal_zstream),  RTE_CACHE_LINE_SIZE,
-                       socket_id);
+                       numa_id);
        if (qp->stream == NULL) {
                ISAL_PMD_LOG(ERR, "Failed to allocate compression stream 
memory");
                goto qp_setup_cleanup;
        }
        /* Initialize memory for compression level buffer */
-       qp->stream->level_buf = rte_zmalloc_socket("Isa-l compression lev_buf",
+       qp->stream->level_buf = rte_zmalloc_numa("Isa-l compression lev_buf",
                        ISAL_DEF_LVL3_DEFAULT, RTE_CACHE_LINE_SIZE,
-                       socket_id);
+                       numa_id);
        if (qp->stream->level_buf == NULL) {
                ISAL_PMD_LOG(ERR, "Failed to allocate compression level_buf 
memory");
                goto qp_setup_cleanup;
        }
 
        /* Initialize memory for decompression state structure */
-       qp->state = rte_zmalloc_socket("Isa-l decompression state",
+       qp->state = rte_zmalloc_numa("Isa-l decompression state",
                        sizeof(struct inflate_state), RTE_CACHE_LINE_SIZE,
-                       socket_id);
+                       numa_id);
        if (qp->state == NULL) {
                ISAL_PMD_LOG(ERR, "Failed to allocate decompression state 
memory");
                goto qp_setup_cleanup;
@@ -288,7 +288,7 @@ isal_comp_pmd_qp_setup(struct rte_compressdev *dev, 
uint16_t qp_id,
        }
 
        qp->processed_pkts = isal_comp_pmd_qp_create_processed_pkts_ring(qp,
-                       max_inflight_ops, socket_id);
+                       max_inflight_ops, numa_id);
        if (qp->processed_pkts == NULL) {
                ISAL_PMD_LOG(ERR, "Failed to create unique name for isal "
                                "compression device");
-- 
2.55.0

Reply via email to