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 13:05:50 +0000 (13:05 +0000)
commitf0b9cdde4173c6cd47f2e0510ffa82d51e306851
tree57925eb558fc5c327da379c2444bd90c89b62abb
parent7429b5c1f7fc966542ac876e935ea92bed37aa63
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