[PATCH 1/2] drivers: replace LIBRTE prefix with mlx5 PMDs

Shani Peretz
2026-02-09T13:56:59Z

rename RTE_LIBRTE_MLX5_DEBUG to RTE_PMD_MLX5_DEBUG.

Bugzilla ID: 1522

Signed-off-by: Shani Peretz <shperetz@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
doc/guides/nics/mlx5.rst | 2 +-
drivers/common/mlx5/linux/mlx5_common_os.c | 2 +-
drivers/common/mlx5/linux/mlx5_nl.c | 4 ++--
drivers/common/mlx5/mlx5_common.h | 14 +++++++-------
drivers/common/mlx5/mlx5_common_mr.c | 4 ++--
drivers/common/mlx5/mlx5_malloc.c | 22 +++++++++++-----------
drivers/net/mlx5/hws/mlx5dr_internal.h | 3 ++-
drivers/net/mlx5/linux/mlx5_os.c | 2 +-
drivers/net/mlx5/mlx5.c | 4 ++--
drivers/net/mlx5/mlx5_flow_dv.c | 8 ++++----
drivers/net/mlx5/mlx5_flow_hw.c | 6 +++---
drivers/net/mlx5/mlx5_tx.c | 2 +-
drivers/net/mlx5/mlx5_tx.h | 6 +++---
drivers/net/mlx5/mlx5_txq.c | 2 +-
drivers/net/mlx5/mlx5_utils.c | 2 +-
drivers/net/mlx5/mlx5_utils.h | 2 +-
drivers/net/mlx5/windows/mlx5_os.c | 2 +-
drivers/regex/mlx5/mlx5_regex_fastpath.c | 2 +-
18 files changed, 45 insertions(+), 44 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index c7f3981dcd..e0bcee7738 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -4430,7 +4430,7 @@ Steps to enable Tx datapath tracing:
.. code-block:: console

meson configure --buildtype=debug -Denable_trace_fp=true
- -Dc_args='-DRTE_LIBRTE_MLX5_DEBUG -DRTE_ENABLE_ASSERT -DALLOW_EXPERIMENTAL_API' build
+ -Dc_args='-DRTE_PMD_MLX5_DEBUG -DRTE_ENABLE_ASSERT -DALLOW_EXPERIMENTAL_API' build

#. Configure the NIC

diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
index 2867e21618..b2d7fe49db 100644
--- a/drivers/common/mlx5/linux/mlx5_common_os.c
+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
@@ -389,7 +389,7 @@ mlx5_glue_constructor(void)
goto glue_error;
#endif

-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
/* Glue structure must not contain any NULL pointers. */
{
unsigned int i;
diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c
index d53543a113..f6ce84fdc4 100644
--- a/drivers/common/mlx5/linux/mlx5_nl.c
+++ b/drivers/common/mlx5/linux/mlx5_nl.c
@@ -482,7 +482,7 @@ mlx5_nl_mac_addr_cb(struct nlmsghdr *nh, void *arg)
rte_errno = ENOMEM;
return -rte_errno;
}
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
char m[RTE_ETHER_ADDR_FMT_SIZE];

rte_ether_format_addr(m, RTE_ETHER_ADDR_FMT_SIZE,
@@ -612,7 +612,7 @@ mlx5_nl_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,
goto error;
return 0;
error:
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
{
char m[RTE_ETHER_ADDR_FMT_SIZE];

diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index 9403385195..672fc39c1d 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -74,7 +74,7 @@ pmd_drv_log_basename(const char *s)
RTE_FMT_HEAD(__VA_ARGS__,), \
RTE_FMT_TAIL(__VA_ARGS__,)))

-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG

#define PMD_DRV_LOG__(level, type, name, ...) \
PMD_DRV_LOG___(level, type, name, "%s:%u: %s(): " __VA_ARGS__)
@@ -86,28 +86,28 @@ pmd_drv_log_basename(const char *s)
__func__, \
__VA_ARGS__)

-#else /* RTE_LIBRTE_MLX5_DEBUG */
+#else /* RTE_PMD_MLX5_DEBUG */
#define PMD_DRV_LOG__(level, type, name, ...) \
PMD_DRV_LOG___(level, type, name, __VA_ARGS__)
#define PMD_DRV_LOG_(level, type, name, s, ...) \
PMD_DRV_LOG__(level, type, name, s "\n", __VA_ARGS__)

-#endif /* RTE_LIBRTE_MLX5_DEBUG */
+#endif /* RTE_PMD_MLX5_DEBUG */

/* claim_zero() does not perform any check when debugging is disabled. */
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG

#define MLX5_ASSERT(exp) RTE_VERIFY(exp)
#define claim_zero(...) MLX5_ASSERT((__VA_ARGS__) == 0)
#define claim_nonzero(...) MLX5_ASSERT((__VA_ARGS__) != 0)

-#else /* RTE_LIBRTE_MLX5_DEBUG */
+#else /* RTE_PMD_MLX5_DEBUG */

#define MLX5_ASSERT(exp) RTE_ASSERT(exp)
#define claim_zero(...) (__VA_ARGS__)
#define claim_nonzero(...) (__VA_ARGS__)

-#endif /* RTE_LIBRTE_MLX5_DEBUG */
+#endif /* RTE_PMD_MLX5_DEBUG */

/**
* Returns true if debug mode is enabled for fast path operations.
@@ -115,7 +115,7 @@ pmd_drv_log_basename(const char *s)
static inline bool
mlx5_fp_debug_enabled(void)
{
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
return true;
#else
return false;
diff --git a/drivers/common/mlx5/mlx5_common_mr.c b/drivers/common/mlx5/mlx5_common_mr.c
index 8ed988dec9..64ffc7f4ea 100644
--- a/drivers/common/mlx5/mlx5_common_mr.c
+++ b/drivers/common/mlx5/mlx5_common_mr.c
@@ -272,7 +272,7 @@ mlx5_mr_btree_free(struct mlx5_mr_btree *bt)
void
mlx5_mr_btree_dump(struct mlx5_mr_btree *bt __rte_unused)
{
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
uint32_t idx;
struct mr_cache_entry *lkp_tbl;

@@ -1319,7 +1319,7 @@ mlx5_free_mr_by_addr(struct mlx5_mr_share_cache *share_cache,
void
mlx5_mr_dump_cache(struct mlx5_mr_share_cache *share_cache __rte_unused)
{
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
struct mlx5_mr *mr;
int mr_n = 0;
int chunk_n = 0;
diff --git a/drivers/common/mlx5/mlx5_malloc.c b/drivers/common/mlx5/mlx5_malloc.c
index 28fb19b285..86e2b8881e 100644
--- a/drivers/common/mlx5/mlx5_malloc.c
+++ b/drivers/common/mlx5/mlx5_malloc.c
@@ -19,7 +19,7 @@ struct mlx5_sys_mem {
uint32_t reserve:30; /* Reserve. */
RTE_ATOMIC(struct rte_memseg_list *) last_msl;
/* last allocated rte memory memseg list. */
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
uint64_t malloc_sys;
/* Memory allocated from system count. */
uint64_t malloc_rte;
@@ -43,7 +43,7 @@ struct mlx5_sys_mem {
static struct mlx5_sys_mem mlx5_sys_mem = {
.init = 0,
.enable = 0,
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
.malloc_sys = 0,
.malloc_rte = 0,
.realloc_sys = 0,
@@ -99,7 +99,7 @@ mlx5_mem_update_msl(void *addr)
rte_atomic_store_explicit(&mlx5_sys_mem.last_msl,
rte_mem_virt2memseg_list(addr),
rte_memory_order_relaxed);
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
rte_atomic_fetch_add_explicit(&mlx5_sys_mem.msl_update, 1,
rte_memory_order_relaxed);
#endif
@@ -126,7 +126,7 @@ mlx5_mem_is_rte(void *addr)
rte_atomic_load_explicit(&mlx5_sys_mem.last_msl, rte_memory_order_relaxed))) {
if (!rte_mem_virt2memseg_list(addr))
return false;
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
rte_atomic_fetch_add_explicit(&mlx5_sys_mem.msl_miss, 1, rte_memory_order_relaxed);
#endif
}
@@ -198,7 +198,7 @@ mlx5_malloc(uint32_t flags, size_t size, unsigned int align, int socket)
}
}
mlx5_mem_update_msl(addr);
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
if (addr)
rte_atomic_fetch_add_explicit(&mlx5_sys_mem.malloc_rte, 1,
rte_memory_order_relaxed);
@@ -212,7 +212,7 @@ mlx5_malloc(uint32_t flags, size_t size, unsigned int align, int socket)
addr = calloc(1, size);
else
addr = malloc(size);
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
if (addr)
rte_atomic_fetch_add_explicit(&mlx5_sys_mem.malloc_sys, 1,
rte_memory_order_relaxed);
@@ -247,7 +247,7 @@ mlx5_realloc(void *addr, uint32_t flags, size_t size, unsigned int align,
if (rte_mem) {
new_addr = rte_realloc_socket(addr, size, align, socket);
mlx5_mem_update_msl(new_addr);
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
if (new_addr)
rte_atomic_fetch_add_explicit(&mlx5_sys_mem.realloc_rte, 1,
rte_memory_order_relaxed);
@@ -260,7 +260,7 @@ mlx5_realloc(void *addr, uint32_t flags, size_t size, unsigned int align,
return NULL;
}
new_addr = realloc(addr, size);
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
if (new_addr)
rte_atomic_fetch_add_explicit(&mlx5_sys_mem.realloc_sys, 1,
rte_memory_order_relaxed);
@@ -275,13 +275,13 @@ mlx5_free(void *addr)
if (addr == NULL)
return;
if (!mlx5_mem_is_rte(addr)) {
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
rte_atomic_fetch_add_explicit(&mlx5_sys_mem.free_sys, 1,
rte_memory_order_relaxed);
#endif
mlx5_os_free(addr);
} else {
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
rte_atomic_fetch_add_explicit(&mlx5_sys_mem.free_rte, 1,
rte_memory_order_relaxed);
#endif
@@ -293,7 +293,7 @@ RTE_EXPORT_INTERNAL_SYMBOL(mlx5_memory_stat_dump)
void
mlx5_memory_stat_dump(void)
{
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
DRV_LOG(INFO, "System memory malloc:%"PRIi64", realloc:%"PRIi64","
" free:%"PRIi64"\nRTE memory malloc:%"PRIi64","
" realloc:%"PRIi64", free:%"PRIi64"\nMSL miss:%"PRIi64","
diff --git a/drivers/net/mlx5/hws/mlx5dr_internal.h b/drivers/net/mlx5/hws/mlx5dr_internal.h
index 6a4aafbe88..3c27206043 100644
--- a/drivers/net/mlx5/hws/mlx5dr_internal.h
+++ b/drivers/net/mlx5/hws/mlx5dr_internal.h
@@ -59,7 +59,8 @@
#define MLX5DR_ASAN_ALIGN
#endif

-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
+
/* Prevent double function name print when debug is set */
#define DR_LOG DRV_LOG
#else
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 7b21bc4ec2..f900d5f160 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1592,7 +1592,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
DRV_LOG(INFO,
"port %u MAC address is " RTE_ETHER_ADDR_PRT_FMT,
eth_dev->data->port_id, RTE_ETHER_ADDR_BYTES(&mac));
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
{
char ifname[MLX5_NAMESIZE];

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 26a05e51c2..9056020364 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1854,7 +1854,7 @@ mlx5_unlock_physical_device(void)
static void
mlx5_physical_device_destroy(struct mlx5_physical_device *phdev)
{
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
/* Check the object presence in the list. */
struct mlx5_physical_device *lphdev;

@@ -2106,7 +2106,7 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
int i = 0;

pthread_mutex_lock(&mlx5_dev_ctx_list_mutex);
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
/* Check the object presence in the list. */
struct mlx5_dev_ctx_shared *lctx;

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 47f6d28410..e431deae3a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9231,7 +9231,7 @@ flow_dv_prepare(struct rte_eth_dev *dev,
return dev_flow;
}

-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
/**
* Sanity check for match mask and value. Similar to check_valid_spec() in
* kernel driver. If unmasked bit is present in value, it returns failure.
@@ -14529,7 +14529,7 @@ flow_dv_translate_items_geneve_opt_nta(struct rte_eth_dev *dev,
const struct rte_flow_item_geneve_opt *geneve_opt_m = items->mask;
void *geneve_parser;
struct mlx5_priv *priv = dev->data->dev_private;
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
struct mlx5_geneve_tlv_option *option;
#endif

@@ -14549,7 +14549,7 @@ flow_dv_translate_items_geneve_opt_nta(struct rte_eth_dev *dev,
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM, items,
" GENEVE OPT parser creation failed ");
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
} else {
/* Check if option exist in current parser. */
option = mlx5_geneve_tlv_option_get(priv,
@@ -14953,7 +14953,7 @@ flow_dv_translate_items_sws(struct rte_eth_dev *dev,
}
dev_flow->handle->vf_vlan.tag = wks.vlan_tag;
matcher->priority = wks.priority;
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
MLX5_ASSERT(!flow_dv_check_valid_spec(match_mask, match_value));
#endif
/*
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index dc70909cff..d24b7909e1 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -17564,7 +17564,7 @@ flow_hw_async_op_validate(struct rte_eth_dev *dev,
/**
* Validate user input for rte_flow_async_create() implementation.
*
- * If RTE_LIBRTE_MLX5_DEBUG macro is not defined, this function is a no-op.
+ * If RTE_PMD_MLX5_DEBUG macro is not defined, this function is a no-op.
*
* @param[in] dev
* Pointer to the rte_eth_dev structure.
@@ -17626,7 +17626,7 @@ flow_hw_async_create_validate(struct rte_eth_dev *dev,
/**
* Validate user input for rte_flow_async_update() implementation.
*
- * If RTE_LIBRTE_MLX5_DEBUG macro is not defined, this function is a no-op.
+ * If RTE_PMD_MLX5_DEBUG macro is not defined, this function is a no-op.
*
* @param[in] dev
* Pointer to the rte_eth_dev structure.
@@ -17665,7 +17665,7 @@ flow_hw_async_update_validate(struct rte_eth_dev *dev,
/**
* Validate user input for rte_flow_async_destroy() implementation.
*
- * If RTE_LIBRTE_MLX5_DEBUG macro is not defined, this function is a no-op.
+ * If RTE_PMD_MLX5_DEBUG macro is not defined, this function is a no-op.
*
* @param[in] dev
* Pointer to the rte_eth_dev structure.
diff --git a/drivers/net/mlx5/mlx5_tx.c b/drivers/net/mlx5/mlx5_tx.c
index fe9da7f8c1..a3a90c91a3 100644
--- a/drivers/net/mlx5/mlx5_tx.c
+++ b/drivers/net/mlx5/mlx5_tx.c
@@ -229,7 +229,7 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *__rte_restrict txq,
}
/* Normal transmit completion. */
MLX5_ASSERT(txq->cq_ci != txq->cq_pi);
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
MLX5_ASSERT((txq->fcqs[txq->cq_ci & txq->cqe_m] >> 16) ==
cqe->wqe_counter);
#endif
diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
index 16307206e2..ccec0c9220 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -154,7 +154,7 @@ struct __rte_cache_aligned mlx5_txq_data {
struct mlx5_mr_ctrl mr_ctrl; /* MR control descriptor. */
struct mlx5_wqe *wqes; /* Work queue. */
struct mlx5_wqe *wqes_end; /* Work queue array limit. */
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
uint32_t *fcqs; /* Free completion queue (debug extended). */
#else
uint16_t *fcqs; /* Free completion queue. */
@@ -763,7 +763,7 @@ mlx5_tx_request_completion(struct mlx5_txq_data *__rte_restrict txq,
last->cseg.flags = RTE_BE32(MLX5_COMP_ALWAYS <<
MLX5_COMP_MODE_OFFSET);
/* Save elts_head in dedicated free on completion queue. */
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
txq->fcqs[txq->cq_pi++ & txq->cqe_m] = head |
(last->cseg.opcode >> 8) << 16;
#else
@@ -808,7 +808,7 @@ mlx5_tx_request_completion_trace(struct mlx5_txq_data *__rte_restrict txq,
txq->elts_comp = head;
}
/* Completion request flag was set on cseg constructing. */
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
txq->fcqs[txq->cq_pi++ & txq->cqe_m] = head |
(wqe->cseg.opcode >> 8) << 16;
#else
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index ad15b20e7b..a09a16958a 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -80,7 +80,7 @@ txq_free_elts(struct mlx5_txq_ctrl *txq_ctrl)

MLX5_ASSERT(elt != NULL);
rte_pktmbuf_free_seg(elt);
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
/* Poisoning. */
memset(&(*elts)[elts_tail & elts_m],
0x77,
diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c
index defcf80dd7..606743c4b7 100644
--- a/drivers/net/mlx5/mlx5_utils.c
+++ b/drivers/net/mlx5/mlx5_utils.c
@@ -377,7 +377,7 @@ mlx5_ipool_allocate_from_global(struct mlx5_indexed_pool *pool, int cidx)
if (lc)
memcpy(p->trunks, lc->trunks, trunk_idx *
sizeof(struct mlx5_indexed_trunk *));
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
memset(RTE_PTR_ADD(p->trunks, trunk_idx * sizeof(void *)), 0,
n_grow * sizeof(void *));
#endif
diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h
index 95866351c2..9ab79c8ad5 100644
--- a/drivers/net/mlx5/mlx5_utils.h
+++ b/drivers/net/mlx5/mlx5_utils.h
@@ -183,7 +183,7 @@ typedef int32_t (*mlx5_l3t_alloc_callback_fn)(void *ctx,
#define TRUNK_MAX_IDX ((1 << TRUNK_IDX_BITS) - 1)
#define TRUNK_INVALID TRUNK_MAX_IDX
#define MLX5_IPOOL_DEFAULT_TRUNK_SIZE (1 << (28 - TRUNK_IDX_BITS))
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
#define POOL_DEBUG 1
#endif

diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
index 37a6bdfe9a..9019d6ca6e 100644
--- a/drivers/net/mlx5/windows/mlx5_os.c
+++ b/drivers/net/mlx5/windows/mlx5_os.c
@@ -490,7 +490,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
DRV_LOG(INFO,
"port %u MAC address is " RTE_ETHER_ADDR_PRT_FMT,
eth_dev->data->port_id, RTE_ETHER_ADDR_BYTES(&mac));
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
{
char ifname[MLX5_NAMESIZE];

diff --git a/drivers/regex/mlx5/mlx5_regex_fastpath.c b/drivers/regex/mlx5/mlx5_regex_fastpath.c
index 6e21574d29..3207bcbc60 100644
--- a/drivers/regex/mlx5/mlx5_regex_fastpath.c
+++ b/drivers/regex/mlx5/mlx5_regex_fastpath.c
@@ -40,7 +40,7 @@
/* In WQE set mode, the pi should be quarter of the MLX5_REGEX_MAX_WQE_INDEX. */
#define MLX5_REGEX_UMR_QP_PI_IDX(pi, ops) \
(((pi) + (ops)) & (MLX5_REGEX_MAX_WQE_INDEX >> 2))
-#ifdef RTE_LIBRTE_MLX5_DEBUG
+#ifdef RTE_PMD_MLX5_DEBUG
#define MLX5_REGEX_DEBUG 0
#endif
#ifdef HAVE_MLX5_UMR_IMKEY
--
2.34.1