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 14:18:19 +0000 (14:18 +0000)
commit0350ed7bccd87c9ce86c55f2c39b69d9f4c9a799
treebdd2c7bf214eafee048692e8b1c2a6746306182e
parentca60e5ca55b860dafda4937c5a9631e149cbbb90
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