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:43:44 +0000 (14:43 +0000)
commit4600709706f10a261df2381b122c55a46f40888e
tree56df6b910d7ba5b2bcc97d09c43e80169cfb3ea9
parentfd12a4ffd665e733d8028f540267894236d60e82
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