]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit - drivers/net/ethernet/sfc/falcon/falcon.c
sfc: Allow driver to cope with a lower number of VIs than it needs for RSS
authorShradha Shah <sshah@solarflare.com>
Fri, 28 Aug 2015 09:55:42 +0000 (10:55 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Aug 2015 20:53:47 +0000 (13:53 -0700)
commitb0fbdae127a3968688ff7b474e9164dc4bf30dd5
treec814ddbcc6d45d2b8ba973d8d6db30f7676254d7
parenta69265e9f65a6747c27b01b4030ad85d71aa11ba
sfc: Allow driver to cope with a lower number of VIs than it needs for RSS

Previously, the driver would refuse to load if it couldn't secure
enough VIs from the MC to fulfill its RSS requirements.
This was causing probe to fail on later functions in
configurations where we'd run out of VIs, such as having many
VFs.

This change allows the driver to load with fewer VIs, down to a
minimum of 2. A warning will be printed saying that RSS
requirements were not met, possibly affecting performance.

efx->max_tx_channels needs to be set to avoid going down the
failure path in efx_probe_nic() immediately in the loop after the
probe() NIC-type function.
Also, Set rc=ENOSPC when bombing out of efx_probe_nic due to lack
of VIs.

Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef10.c
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/efx.h
drivers/net/ethernet/sfc/falcon.c
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/siena.c