net: ena: allow the driver to work with small number of msix vectors
authorNetanel Belgazal <netanel@amazon.com>
Fri, 23 Jun 2017 08:21:55 +0000 (11:21 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jun 2017 18:15:10 +0000 (14:15 -0400)
commit06443684daede6ded1fab8f8729249436fb0cd8e
tree6eaf3e369d014d4c12443c43f056174ebc8a6e67
parentad974baef2a17a170fe837ad19f10dcab63e9470
net: ena: allow the driver to work with small number of msix vectors

Current driver tries to allocate msix vectors as the number of the
negotiated io queues. (with another msix vector for management).
If pci_alloc_irq_vectors() fails, the driver aborts the probe
and the ENA network device is never brought up.

With this patch, the driver's logic will reduce the number of IO
queues to the number of allocated msix vectors (minus one for management)
instead of failing probe().

Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c
drivers/net/ethernet/amazon/ena/ena_netdev.h