[PATCH 2/2] net/mlx4: replace LIBRTE prefix with PMD

Shani Peretz
2026-02-09T13:57:05Z

rename RTE_LIBRTE_MLX4_DEBUG to RTE_PMD_MLX4_DEBUG.

Bugzilla ID: 1522

Signed-off-by: Shani Peretz <shperetz@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx4/mlx4.c | 4 ++--
drivers/net/mlx4/mlx4_mr.c | 8 ++++----
drivers/net/mlx4/mlx4_rxtx.c | 8 ++++----
drivers/net/mlx4/mlx4_utils.h | 6 +++---
4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 997829a107..28f1116891 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -305,7 +305,7 @@ mlx4_dev_start(struct rte_eth_dev *dev)
(void *)dev, strerror(-ret));
goto err;
}
-#ifdef RTE_LIBRTE_MLX4_DEBUG
+#ifdef RTE_PMD_MLX4_DEBUG
mlx4_mr_dump_dev(dev);
#endif
ret = mlx4_rxq_intr_enable(priv);
@@ -1367,7 +1367,7 @@ RTE_INIT(rte_mlx4_pmd_init)
return;
MLX4_ASSERT(mlx4_glue);
#endif
-#ifdef RTE_LIBRTE_MLX4_DEBUG
+#ifdef RTE_PMD_MLX4_DEBUG
/* Glue structure must not contain any NULL pointers. */
{
unsigned int i;
diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c
index 2251c624ff..e307029b15 100644
--- a/drivers/net/mlx4/mlx4_mr.c
+++ b/drivers/net/mlx4/mlx4_mr.c
@@ -241,7 +241,7 @@ mlx4_mr_btree_free(struct mlx4_mr_btree *bt)
memset(bt, 0, sizeof(*bt));
}

-#ifdef RTE_LIBRTE_MLX4_DEBUG
+#ifdef RTE_PMD_MLX4_DEBUG
/**
* Dump all the entries in a B-tree
*
@@ -956,7 +956,7 @@ mlx4_mr_mem_event_free_cb(struct rte_eth_dev *dev, const void *addr, size_t len)
priv->mr.dev_gen);
}
rte_rwlock_write_unlock(&priv->mr.rwlock);
-#ifdef RTE_LIBRTE_MLX4_DEBUG
+#ifdef RTE_PMD_MLX4_DEBUG
if (rebuild)
mlx4_mr_dump_dev(dev);
#endif
@@ -1374,7 +1374,7 @@ mlx4_mr_update_mp(struct rte_eth_dev *dev, struct mlx4_mr_ctrl *mr_ctrl,
return data.ret;
}

-#ifdef RTE_LIBRTE_MLX4_DEBUG
+#ifdef RTE_PMD_MLX4_DEBUG
/**
* Dump all the created MRs and the global cache entries.
*
@@ -1434,7 +1434,7 @@ mlx4_mr_release(struct rte_eth_dev *dev)
rte_rwlock_write_lock(&mlx4_shared_data->mem_event_rwlock);
LIST_REMOVE(priv, mem_event_cb);
rte_rwlock_write_unlock(&mlx4_shared_data->mem_event_rwlock);
-#ifdef RTE_LIBRTE_MLX4_DEBUG
+#ifdef RTE_PMD_MLX4_DEBUG
mlx4_mr_dump_dev(dev);
#endif
rte_rwlock_write_lock(&priv->mr.rwlock);
diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c
index a4df6f7bcb..3ad1c5b6ec 100644
--- a/drivers/net/mlx4/mlx4_rxtx.c
+++ b/drivers/net/mlx4/mlx4_rxtx.c
@@ -320,7 +320,7 @@ mlx4_txq_complete(struct txq *txq, const unsigned int elts_m,
if (unlikely(!!(cqe->owner_sr_opcode & MLX4_CQE_OWNER_MASK) ^
!!(cons_index & cq->cqe_cnt)))
break;
-#ifdef RTE_LIBRTE_MLX4_DEBUG
+#ifdef RTE_PMD_MLX4_DEBUG
/*
* Make sure we read the CQE after we read the ownership bit.
*/
@@ -335,7 +335,7 @@ mlx4_txq_complete(struct txq *txq, const unsigned int elts_m,
cqe_err->syndrome);
break;
}
-#endif /* RTE_LIBRTE_MLX4_DEBUG */
+#endif /* RTE_PMD_MLX4_DEBUG */
cons_index++;
} while (1);
completed = (cons_index - cq->cons_index) * txq->elts_comp_cd_init;
@@ -487,14 +487,14 @@ mlx4_tx_burst_fill_tso_dsegs(struct rte_mbuf *buf,
((uintptr_t)dseg & (MLX4_TXBB_SIZE - 1))) >>
MLX4_SEG_SHIFT;
switch (nb_segs_txbb) {
-#ifdef RTE_LIBRTE_MLX4_DEBUG
+#ifdef RTE_PMD_MLX4_DEBUG
default:
/* Should never happen. */
rte_panic("%p: Invalid number of SGEs(%d) for a TXBB",
(void *)txq, nb_segs_txbb);
/* rte_panic never returns. */
break;
-#endif /* RTE_LIBRTE_MLX4_DEBUG */
+#endif /* RTE_PMD_MLX4_DEBUG */
case 4:
/* Memory region key for this memory pool. */
lkey = mlx4_tx_mb2mr(txq, sbuf);
diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h
index 4b3323be8c..98de27423d 100644
--- a/drivers/net/mlx4/mlx4_utils.h
+++ b/drivers/net/mlx4/mlx4_utils.h
@@ -27,7 +27,7 @@
extern int mlx4_logtype;
#define RTE_LOGTYPE_MLX4 mlx4_logtype

-#ifdef RTE_LIBRTE_MLX4_DEBUG
+#ifdef RTE_PMD_MLX4_DEBUG

/*
* When debugging is enabled (MLX4_DEBUG is defined), file, line and function
@@ -53,7 +53,7 @@ pmd_drv_log_basename(const char *s)
#define MLX4_ASSERT(exp) RTE_VERIFY(exp)
#define claim_zero(...) MLX4_ASSERT((__VA_ARGS__) == 0)

-#else /* RTE_LIBRTE_MLX4_DEBUG */
+#else /* RTE_PMD_MLX4_DEBUG */

/*
* Like MLX4_ASSERT(), claim_zero() does not perform
@@ -65,7 +65,7 @@ pmd_drv_log_basename(const char *s)
#define MLX4_ASSERT(exp) RTE_ASSERT(exp)
#define claim_zero(...) (__VA_ARGS__)

-#endif /* RTE_LIBRTE_MLX4_DEBUG */
+#endif /* RTE_PMD_MLX4_DEBUG */

#define DEBUG(...) PMD_DRV_LOG(DEBUG, __VA_ARGS__)
#define INFO(...) PMD_DRV_LOG(INFO, __VA_ARGS__)
--
2.34.1