ice: Fix setting coalesce to handle DCB configuration
authorBrett Creeley <brett.creeley@intel.com>
Fri, 8 Nov 2019 14:23:23 +0000 (06:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:45:47 +0000 (16:45 +0100)
commit3e3e341d1f4584beffbf276d00adf6e2c35bda92
tree45f74f27aa25a92181cfc6b7d54d08cfdcea5294
parentb533200b40334bd86caa737b0ff033ecc391d071
ice: Fix setting coalesce to handle DCB configuration

[ Upstream commit e25f9152bc07de534b2b590ce6c052ea25dd8900 ]

Currently there can be a case where a DCB map is applied and there are
more interrupt vectors (vsi->num_q_vectors) than Rx queues (vsi->num_rxq)
and Tx queues (vsi->num_txq). If we try to set coalesce settings in this
case it will report a false failure. Fix this by checking if vector index
is valid with respect to the number of Tx and Rx queues configured.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_ethtool.c