ixgbe: Fix calculation of queue with VFs and flow director on interface flap
authorCambda Zhu <cambda@linux.alibaba.com>
Wed, 27 Nov 2019 09:03:55 +0000 (17:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Feb 2020 21:22:44 +0000 (21:22 +0000)
commitfd335ee1e9e2446b333e59a9becf65805bb8fe3b
tree1927e0ffa3d3e9877fcb8af00f2a9a5ce8c9662b
parent5113ff357d8103b0a4a3792d859d0569efa19b57
ixgbe: Fix calculation of queue with VFs and flow director on interface flap

[ Upstream commit 4fad78ad6422d9bca62135bbed8b6abc4cbb85b8 ]

This patch fixes the calculation of queue when we restore flow director
filters after resetting adapter. In ixgbe_fdir_filter_restore(), filter's
vf may be zero which makes the queue outside of the rx_ring array.

The calculation is changed to the same as ixgbe_add_ethtool_fdir_entry().

Signed-off-by: Cambda Zhu <cambda@linux.alibaba.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/ixgbe/ixgbe_main.c