OSDN Git Service

ice: Don't allow more channels than LAN MSI-X available
authorBrett Creeley <brett.creeley@intel.com>
Thu, 21 Jan 2021 18:38:05 +0000 (10:38 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 26 Jan 2021 18:44:17 +0000 (10:44 -0800)
commit943b881e35829403da638fcb34a959125deafef3
treeb1276981713b008d186a609e0f6e80af2fd829c2
parent13ed5e8a9b9ccd140a79e80283f69d724c9bb2be
ice: Don't allow more channels than LAN MSI-X available

Currently users could create more channels than LAN MSI-X available.
This is happening because there is no check against pf->num_lan_msix
when checking the max allowed channels and will cause performance issues
if multiple Tx and Rx queues are tied to a single MSI-X. Fix this by not
allowing more channels than LAN MSI-X available in pf->num_lan_msix.

Fixes: 87324e747fde ("ice: Implement ethtool ops for channels")
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ethtool.c