Commit ec3d7f5
mlx5: Implement UAR fallback for td allocation
In mlx5_alloc_td(), check if blueflame is supported by examining
ctx->bf_reg_size before attempting UAR allocation. When blueflame is not
supported (bf_reg_size == 0), fallback to using the shared nc
(non-cached) UAR instead of trying to allocate a dedicated UAR.
This prevents unnecessary dedicated UAR allocation attempts on devices
that don't support blueflame, while ensuring td allocation succeeds by
using the available non-cached singleton UAR.
In mlx5_dealloc_td(), only detach dedicated UARs by checking the
singleton flag to avoid incorrectly freeing the shared nc_uar.
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>1 parent 1dc3e8d commit ec3d7f5
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| 451 | + | |
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
464 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
465 | 471 | | |
466 | 472 | | |
467 | 473 | | |
| |||
481 | 487 | | |
482 | 488 | | |
483 | 489 | | |
484 | | - | |
| 490 | + | |
| 491 | + | |
485 | 492 | | |
486 | 493 | | |
487 | 494 | | |
| |||
0 commit comments