Thread (3 messages) 3 messages, 3 authors, 2023-05-31

Re: [PATCH net v2] net/mlx5: Fix setting of irq->map.index for static IRQ case

From: Saeed Mahameed <saeed@kernel.org>
Date: 2023-05-31 21:49:56
Also in: linux-rdma, linux-s390, lkml

On 31 May 11:38, Cédric Le Goater wrote:
On 5/31/23 10:48, Niklas Schnelle wrote:
quoted
When dynamic IRQ allocation is not supported all IRQs are allocated up
front in mlx5_irq_table_create() instead of dynamically as part of
mlx5_irq_alloc(). In the latter dynamic case irq->map.index is set
via the mapping returned by pci_msix_alloc_irq_at(). In the static case
and prior to commit 1da438c0ae02 ("net/mlx5: Fix indexing of mlx5_irq")
irq->map.index was set in mlx5_irq_alloc() twice once initially to 0 and
then to the requested index before storing in the xarray. After this
commit it is only set to 0 which breaks all other IRQ mappings.

Fix this by setting irq->map.index to the requested index together with
irq->map.virq and improve the related comment to make it clearer which
cases it deals with.

Tested-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Simon Horman <redacted>
Reviewed-by: Eli Cohen <redacted>
Fixes: 1da438c0ae02 ("net/mlx5: Fix indexing of mlx5_irq")
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Applied to net-mlx5. 

Thanks.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help