public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: banoth.saikumar@oracle.com
To: viacheslavo@nvidia.com, bingz@nvidia.com
Cc: dev@dpdk.org, Banoth Saikumar <banoth.saikumar@oracle.com>,
	stable@dpdk.org
Subject: [PATCH] net/mlx5: fallback to verbs for Tx memory allocation if devx unsupported
Date: Mon, 23 Mar 2026 17:04:02 +0530	[thread overview]
Message-ID: <20260323113403.1984-1-banoth.saikumar@oracle.com> (raw)

From: Banoth Saikumar <banoth.saikumar@oracle.com>

Previously, the mlx5 PMD attempted to allocate consecutive Tx memory
using DevX without checking whether the NIC actually supported DevX.
This led to allocation failures on legacy or unsupported NICs.

This patch adds a fallback mechanism: if DevX is not available, the PMD
skips DevX-based allocation and allows the verbs path to handle memory
allocation and registration. This improves compatibility with older
NICs and ensures Tx queue setup proceeds correctly.

Fixes: bbfab2eb2528 ("net/mlx5: allocate and release unique
resources for Tx queues")
Cc: stable@dpdk.org

Signed-off-by: Banoth Saikumar <banoth.saikumar@oracle.com>
---
 drivers/net/mlx5/mlx5_trigger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 6c6f228..c9ce3d4 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1161,7 +1161,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 || !priv->sh->cdev->config.devx)
 		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;
-- 
1.8.3.1


                 reply	other threads:[~2026-03-23 11:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260323113403.1984-1-banoth.saikumar@oracle.com \
    --to=banoth.saikumar@oracle.com \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox