* [PATCH v2] net/mlx5: fallback to verbs for Tx memory allocation if devx unsupported
[not found] <'20260323113403.1984-1-banoth.saikumar@oracle.com'>
@ 2026-06-30 10:23 ` banoth.saikumar
2026-07-13 11:15 ` Dariusz Sosnowski
2026-09-25 10:04 ` [PATCH v2] net/mlx5: fall back to Verbs Tx allocation without DevX Banoth Saikumar
0 siblings, 2 replies; 5+ messages in thread
From: banoth.saikumar @ 2026-06-30 10:23 UTC (permalink / raw)
To: dsosnowski, viacheslavo, bingz; +Cc: dev, stable, Banoth Saikumar
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>
---
v2:
- Use mlx5_devx_obj_ops_en() instead of checking config.devx directly.
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 6c6f228afd..721fa5e2c8 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 || !mlx5_devx_obj_ops_en(priv->sh))
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.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net/mlx5: fallback to verbs for Tx memory allocation if devx unsupported
2026-06-30 10:23 ` [PATCH v2] net/mlx5: fallback to verbs for Tx memory allocation if devx unsupported banoth.saikumar
@ 2026-07-13 11:15 ` Dariusz Sosnowski
2026-08-20 16:48 ` [External] : " Banoth Saikumar
2026-09-25 10:04 ` [PATCH v2] net/mlx5: fall back to Verbs Tx allocation without DevX Banoth Saikumar
1 sibling, 1 reply; 5+ messages in thread
From: Dariusz Sosnowski @ 2026-07-13 11:15 UTC (permalink / raw)
To: banoth.saikumar; +Cc: viacheslavo, bingz, dev, stable
On Tue, Jun 30, 2026 at 03:53:11PM +0530, banoth.saikumar@oracle.com wrote:
> 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>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [External] : Re: [PATCH v2] net/mlx5: fallback to verbs for Tx memory allocation if devx unsupported
2026-07-13 11:15 ` Dariusz Sosnowski
@ 2026-08-20 16:48 ` Banoth Saikumar
2026-09-21 8:36 ` Dariusz Sosnowski
0 siblings, 1 reply; 5+ messages in thread
From: Banoth Saikumar @ 2026-08-20 16:48 UTC (permalink / raw)
To: Dariusz Sosnowski
Cc: viacheslavo@nvidia.com, bingz@nvidia.com, dev@dpdk.org,
stable@dpdk.org, Banoth Saikumar
[-- Attachment #1: Type: text/plain, Size: 1912 bytes --]
Oracle Confidential
Hi Dariusz,
I noticed that this patch was later reverted by:
> net/mlx5: revert fallback to Verbs Tx allocation
The revert mentions that on Windows, DevX CQ creation was failing due to
a different allocation fallback behavior.
Could you please clarify what specific behavior needs to be addressed
for Windows?
Should the original fallback be reworked to handle the Windows case,
or should the fallback be avoided entirely when running on Windows?
I would like to understand the expected behavior so I can work on a
correct fix.
Thanks,
Banoth Saikumar
Oracle Confidential
________________________________
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Sent: 13 July 2026 16:45
To: Banoth Saikumar <banoth.saikumar@oracle.com>
Cc: viacheslavo@nvidia.com <viacheslavo@nvidia.com>; bingz@nvidia.com <bingz@nvidia.com>; dev@dpdk.org <dev@dpdk.org>; stable@dpdk.org <stable@dpdk.org>
Subject: [External] : Re: [PATCH v2] net/mlx5: fallback to verbs for Tx memory allocation if devx unsupported
On Tue, Jun 30, 2026 at 03:53:11PM +0530, banoth.saikumar@oracle.com wrote:
> 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>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
[-- Attachment #2: Type: text/html, Size: 6444 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [External] : Re: [PATCH v2] net/mlx5: fallback to verbs for Tx memory allocation if devx unsupported
2026-08-20 16:48 ` [External] : " Banoth Saikumar
@ 2026-09-21 8:36 ` Dariusz Sosnowski
0 siblings, 0 replies; 5+ messages in thread
From: Dariusz Sosnowski @ 2026-09-21 8:36 UTC (permalink / raw)
To: Banoth Saikumar
Cc: viacheslavo@nvidia.com, bingz@nvidia.com, dev@dpdk.org,
stable@dpdk.org, Maayan Kashani
Hi,
I apologize for the late reply.
On Thu, Aug 20, 2026 at 04:48:08PM +0000, Banoth Saikumar wrote:
> Oracle Confidential
>
> Hi Dariusz,
>
> I noticed that this patch was later reverted by:
>
> > net/mlx5: revert fallback to Verbs Tx allocation
>
> The revert mentions that on Windows, DevX CQ creation was failing due to
> a different allocation fallback behavior.
>
> Could you please clarify what specific behavior needs to be addressed
> for Windows?
The problem is that mlx5_devx_obj_ops_en() checks too much
for both platforms. Specifically, it returns true if:
- DevX is available (sh->cdev->config.devx) AND
- At least Direct Verbs steering is enabled (sh->config.dv_flow_en) AND
- mlx5dv_dr TIR flow action is available (sh->dev_cap.dest_tir;
RSS action can be configured over Direct Rules with rdma-core).
On Windows, the last condition is not satisfied because
a different mechanism is used there to create flow rules.
mlx5_devx_obj_ops_en() function and its callers should be refactored
to only check the DevX state as the name suggests.
After this is done, the fix can reapplied.
We'll provide the patches which rework the above,
so that original fix can be reapplied, in this release cycle.
>
> Should the original fallback be reworked to handle the Windows case,
> or should the fallback be avoided entirely when running on Windows?
>
> I would like to understand the expected behavior so I can work on a
> correct fix.
>
> Thanks,
> Banoth Saikumar
[snip]
Best regards,
Dariusz Sosnowski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net/mlx5: fall back to Verbs Tx allocation without DevX
2026-06-30 10:23 ` [PATCH v2] net/mlx5: fallback to verbs for Tx memory allocation if devx unsupported banoth.saikumar
2026-07-13 11:15 ` Dariusz Sosnowski
@ 2026-09-25 10:04 ` Banoth Saikumar
1 sibling, 0 replies; 5+ messages in thread
From: Banoth Saikumar @ 2026-09-25 10:04 UTC (permalink / raw)
To: dsosnowski; +Cc: banoth.saikumar, bingz, dev, stable, viacheslavo
Hi Dariusz,
Thanks for the clarification.
Understood. You will reapply the original patch once the
mlx5_devx_obj_ops_en() function is refactored.
Thanks,
Banoth Saikumar
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-25 10:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <'20260323113403.1984-1-banoth.saikumar@oracle.com'>
2026-06-30 10:23 ` [PATCH v2] net/mlx5: fallback to verbs for Tx memory allocation if devx unsupported banoth.saikumar
2026-07-13 11:15 ` Dariusz Sosnowski
2026-08-20 16:48 ` [External] : " Banoth Saikumar
2026-09-21 8:36 ` Dariusz Sosnowski
2026-09-25 10:04 ` [PATCH v2] net/mlx5: fall back to Verbs Tx allocation without DevX Banoth Saikumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).