ice: Do not enable NAPI on q_vectors that have no rings
authorYoung Xiao <YangX92@hotmail.com>
Thu, 29 Nov 2018 01:54:10 +0000 (01:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:47:15 +0000 (19:47 +0100)
commitd01b26e77af8fab85437c56825370fa0648e8454
tree7f0ed40e7e0fb2d604f4231110fbed59de9fd32a
parent8a35f678e603122ff9a4093e9c3825c7bb1cdfb9
ice: Do not enable NAPI on q_vectors that have no rings

[ Upstream commit eec903769b4ea476591ffff73bb7359f14f38c51 ]

If ice driver has q_vectors w/ active NAPI that has no rings,
then this will result in a divide by zero error. To correct it
I am updating the driver code so that we only support NAPI on
q_vectors that have 1 or more rings allocated to them.

See commit 13a8cd191a2b ("i40e: Do not enable NAPI on q_vectors
that have no rings") for detail.

Signed-off-by: Young Xiao <YangX92@hotmail.com>
Acked-by: Anirudh Venkataramanan <anirudh.venkataramanan@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_main.c