]> git.ipfire.org Git - thirdparty/linux.git/commit
net: mana: Allocate MSI-X vectors dynamically
authorShradha Gupta <shradhagupta@linux.microsoft.com>
Wed, 11 Jun 2025 14:11:13 +0000 (07:11 -0700)
committerShradha Gupta <shradhagupta@linux.microsoft.com>
Tue, 17 Jun 2025 06:15:15 +0000 (06:15 +0000)
commit755391121038c06cb653241aa94dcabd87179f62
tree21311e7118ec244e85f1f9bf13417d8b213aa6bf
parent845c62c543d6bd5d8b80f53835997789e4bb8e29
net: mana: Allocate MSI-X vectors dynamically

Currently, the MANA driver allocates MSI-X vectors statically based on
MANA_MAX_NUM_QUEUES and num_online_cpus() values and in some cases ends
up allocating more vectors than it needs. This is because, by this time
we do not have a HW channel and do not know how many IRQs should be
allocated.

To avoid this, we allocate 1 MSI-X vector during the creation of HWC and
after getting the value supported by hardware, dynamically add the
remaining MSI-X vectors.

Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
drivers/net/ethernet/microsoft/mana/gdma_main.c
include/net/mana/gdma.h