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/mlx5/mlx5_compress.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c index d122715672..0c64c2f97a 100644 --- a/drivers/compress/mlx5/mlx5_compress.c +++ b/drivers/compress/mlx5/mlx5_compress.c @@ -57,7 +57,7 @@ struct mlx5_compress_qp { uint16_t pi; uint16_t ci; struct mlx5_mr_ctrl mr_ctrl; - int socket_id; + int numa_id; struct mlx5_devx_cq cq; struct mlx5_devx_qp qp; struct mlx5_pmd_mr opaque_mr; @@ -150,7 +150,7 @@ mlx5_compress_init_qp(struct mlx5_compress_qp *qp) static int mlx5_compress_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 mlx5_compress_priv *priv = dev->data->dev_private; struct mlx5_hca_attr *attr = &priv->cdev->config.hca_attr; @@ -170,8 +170,8 @@ mlx5_compress_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, alloc_size = RTE_ALIGN(alloc_size, RTE_CACHE_LINE_SIZE); alloc_size += sizeof(struct rte_comp_op *) * (1u << log_ops_n); - qp = rte_zmalloc_socket(__func__, alloc_size, RTE_CACHE_LINE_SIZE, - socket_id); + qp = rte_zmalloc_numa(__func__, alloc_size, RTE_CACHE_LINE_SIZE, + numa_id); if (qp == NULL) { DRV_LOG(ERR, "Failed to allocate qp memory."); rte_errno = ENOMEM; @@ -194,7 +194,7 @@ mlx5_compress_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, goto err; } qp->entries_n = 1 << log_ops_n; - qp->socket_id = socket_id; + qp->numa_id = numa_id; qp->qp_id = qp_id; qp->priv = priv; qp->ops = (struct rte_comp_op **)RTE_ALIGN((uintptr_t)(qp + 1), @@ -208,7 +208,7 @@ mlx5_compress_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, goto err; } ret = mlx5_devx_cq_create(priv->cdev->ctx, &qp->cq, log_ops_n, &cq_attr, - socket_id); + numa_id); if (ret != 0) { DRV_LOG(ERR, "Failed to create CQ."); goto err; @@ -223,7 +223,7 @@ mlx5_compress_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, attr->decomp_deflate_v1_en || attr->decomp_deflate_v2_en; ret = mlx5_devx_qp_create(priv->cdev->ctx, &qp->qp, qp_attr.num_of_send_wqbbs * - MLX5_WQE_SIZE, &qp_attr, socket_id); + MLX5_WQE_SIZE, &qp_attr, numa_id); if (ret != 0) { DRV_LOG(ERR, "Failed to create QP."); goto err; @@ -368,7 +368,7 @@ mlx5_compress_xform_create(struct rte_compressdev *dev, ret = mlx5_compress_xform_validate(xform, &priv->cdev->config.hca_attr); if (ret < 0) return ret; - xfrm = rte_zmalloc_socket(__func__, sizeof(*xfrm), 0, + xfrm = rte_zmalloc_numa(__func__, sizeof(*xfrm), 0, priv->dev_config.numa_id); if (xfrm == NULL) return -ENOMEM; @@ -828,7 +828,7 @@ mlx5_compress_dev_probe(struct mlx5_common_device *cdev, struct mlx5_compress_devarg_params devarg_prms = {0}; struct rte_compressdev_pmd_init_params init_params = { .name = "", - .socket_id = cdev->dev->numa_node, + .numa_id = cdev->dev->numa_node, }; const char *ibdev_name = mlx5_os_get_ctx_device_name(cdev->ctx); uint32_t crc32_opaq_offset; -- 2.55.0

