From: Chengwen Feng <[email protected]>

Rename socket_id parameters, local variables and comments to the
NUMA node terminology, and switch calls to the NUMA-named APIs.

Signed-off-by: Chengwen Feng <[email protected]>
---
 examples/fips_validation/fips_dev_self_test.c | 10 +++++-----
 examples/fips_validation/main.c               | 14 +++++++-------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/examples/fips_validation/fips_dev_self_test.c 
b/examples/fips_validation/fips_dev_self_test.c
index 667f5da4e7..5807b4ac90 100644
--- a/examples/fips_validation/fips_dev_self_test.c
+++ b/examples/fips_validation/fips_dev_self_test.c
@@ -1533,7 +1533,7 @@ fips_dev_auto_test_init(uint8_t dev_id, struct 
fips_dev_auto_test_env *env)
        char name[128];
        int ret;
 
-       conf.socket_id = rte_cryptodev_socket_id(dev_id);
+       conf.numa_id = rte_cryptodev_numa_id(dev_id);
        conf.nb_queue_pairs = 1;
        conf.ff_disable = 0;
 
@@ -1547,7 +1547,7 @@ fips_dev_auto_test_init(uint8_t dev_id, struct 
fips_dev_auto_test_env *env)
        memset(env, 0, sizeof(*env));
 
        env->mpool = rte_pktmbuf_pool_create(name, 128, 0, 0,
-                       UINT16_MAX, rte_cryptodev_socket_id(dev_id));
+                       UINT16_MAX, rte_cryptodev_numa_id(dev_id));
        if (!env->mpool) {
                ret = -ENOMEM;
                goto error_exit;
@@ -1561,7 +1561,7 @@ fips_dev_auto_test_init(uint8_t dev_id, struct 
fips_dev_auto_test_env *env)
                        RTE_CRYPTO_OP_TYPE_SYMMETRIC,
                        16, 0,
                        16,
-                       rte_socket_id());
+                       rte_numa_id());
        if (!env->op_pool) {
                ret = -ENOMEM;
                goto error_exit;
@@ -1571,7 +1571,7 @@ fips_dev_auto_test_init(uint8_t dev_id, struct 
fips_dev_auto_test_env *env)
        snprintf(name, 128, "%s%u", "SELF_TEST_SESS_POOL", dev_id);
 
        env->sess_pool = rte_cryptodev_sym_session_pool_create(name,
-                       128, sess_sz, 0, 0, rte_cryptodev_socket_id(dev_id));
+                       128, sess_sz, 0, 0, rte_cryptodev_numa_id(dev_id));
        if (!env->sess_pool) {
                ret = -ENOMEM;
                goto error_exit;
@@ -1580,7 +1580,7 @@ fips_dev_auto_test_init(uint8_t dev_id, struct 
fips_dev_auto_test_env *env)
        qp_conf.mp_session = env->sess_pool;
 
        ret = rte_cryptodev_queue_pair_setup(dev_id, 0, &qp_conf,
-                       rte_cryptodev_socket_id(dev_id));
+                       rte_cryptodev_numa_id(dev_id));
        if (ret < 0)
                goto error_exit;
 
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 2b6d55aa51..f17062f8b9 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -95,7 +95,7 @@ cryptodev_fips_validate_app_sym_init(void)
 
        ret = -ENOMEM;
        sym->sess_mpool = rte_cryptodev_sym_session_pool_create(
-                       "FIPS_SYM_SESS_MEMPOOL", 16, sess_sz, 0, 0, 
rte_socket_id());
+                       "FIPS_SYM_SESS_MEMPOOL", 16, sess_sz, 0, 0, 
rte_numa_id());
        if (!sym->sess_mpool)
                goto error_exit;
 
@@ -104,7 +104,7 @@ cryptodev_fips_validate_app_sym_init(void)
                        RTE_CRYPTO_OP_TYPE_SYMMETRIC,
                        1, 0,
                        16,
-                       rte_socket_id());
+                       rte_numa_id());
        if (!sym->op_pool)
                goto error_exit;
 
@@ -140,7 +140,7 @@ cryptodev_fips_validate_app_asym_init(void)
 
        ret = -ENOMEM;
        asym->sess_mpool = rte_cryptodev_asym_session_pool_create(
-                       "FIPS_ASYM_SESS_MEMPOOL", 16, 0, 0, rte_socket_id());
+                       "FIPS_ASYM_SESS_MEMPOOL", 16, 0, 0, rte_numa_id());
        if (!asym->sess_mpool)
                goto error_exit;
 
@@ -149,7 +149,7 @@ cryptodev_fips_validate_app_asym_init(void)
                        RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
                        1, 0,
                        16,
-                       rte_socket_id());
+                       rte_numa_id());
        if (!asym->op_pool)
                goto error_exit;
 
@@ -179,7 +179,7 @@ cryptodev_fips_validate_app_asym_uninit(void)
 static int
 cryptodev_fips_validate_app_init(void)
 {
-       struct rte_cryptodev_config conf = {rte_socket_id(), 1, 0};
+       struct rte_cryptodev_config conf = {rte_numa_id(), 1, 0};
        struct rte_cryptodev_qp_conf qp_conf = {128, NULL};
        uint32_t nb_mbufs = UINT16_MAX / env.mbuf_data_room + 1;
        int ret;
@@ -201,7 +201,7 @@ cryptodev_fips_validate_app_init(void)
        ret = -ENOMEM;
        env.mpool = rte_pktmbuf_pool_create("FIPS_MEMPOOL", nb_mbufs,
                        0, 0, sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM +
-                       env.mbuf_data_room, rte_socket_id());
+                       env.mbuf_data_room, rte_numa_id());
        if (!env.mpool)
                return ret;
 
@@ -218,7 +218,7 @@ cryptodev_fips_validate_app_init(void)
        qp_conf.mp_session = env.sym.sess_mpool;
 
        ret = rte_cryptodev_queue_pair_setup(env.dev_id, 0, &qp_conf,
-                       rte_socket_id());
+                       rte_numa_id());
        if (ret < 0)
                goto error_exit;
 
-- 
2.55.0

Reply via email to