From: Banoth Saikumar <[email protected]>
Previously, the mlx5 PMD attempted to allocate consecutive Tx memory
using DevX without checking whether DevX object operations are used.
This led to allocation failures on legacy or unsupported NICs.
Skip that allocation when the port uses Verbs object operations and let
the Verbs path handle memory allocation and registration.
Fixes: bbfab2eb2528 ("net/mlx5: allocate and release unique resources for Tx
queues")
Cc: [email protected]
Signed-off-by: Banoth Saikumar <[email protected]>
Acked-by: Dariusz Sosnowski <[email protected]>
Signed-off-by: Maayan Kashani <[email protected]>
---
.mailmap | 1 +
drivers/net/mlx5/mlx5_trigger.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 6d9e262cfb3..d5cfb05b37e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -190,6 +190,7 @@ Ayuj Verma <[email protected]>
<[email protected]>
Balakrishna Bhamidipati <[email protected]>
Balasubramanian Manoharan <[email protected]>
Balazs Nemeth <[email protected]> <[email protected]>
+Banoth Saikumar <[email protected]>
Bao-Long Tran <[email protected]>
Baoyuan Li <[email protected]>
Bar Neuman <[email protected]>
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index ef71b59fe9c..1dbde509d26 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1201,7 +1201,7 @@ static int mlx5_dev_allocate_consec_tx_mem(struct
rte_eth_dev *dev)
void *umem_buf = NULL;
/* Legacy per queue allocation, do nothing here. */
- if (priv->sh->config.txq_mem_algn == 0)
+ if (priv->sh->config.txq_mem_algn == 0 || !mlx5_devx_obj_ops_en(priv))
return 0;
alignment = (size_t)1 << priv->sh->config.txq_mem_algn;
total_size = priv->consec_tx_mem.sq_total_size +
priv->consec_tx_mem.cq_total_size;
--
2.21.0