diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2011-05-14 03:16:02 +0200 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-06-24 07:46:37 +0200 |
commit | 1f4d51836f5e49f2e5201f1daf90239c04b3faf2 (patch) | |
tree | e6bb9cd4125067201c9ec57961ebbeecf7d912dc /drivers/net/ixgbe/ixgbe_main.c | |
parent | ixgbe: disable RSC when Rx checksum is off (diff) | |
download | linux-1f4d51836f5e49f2e5201f1daf90239c04b3faf2.tar.xz linux-1f4d51836f5e49f2e5201f1daf90239c04b3faf2.zip |
ixgbe: fix ring assignment issues for SR-IOV and drop cases
This change fixes the fact that we would trigger a null pointer dereference
or specify the wrong ring if the rings were restored. This change makes
certain that the DROP queue is a static value, and all other rings are
based on the ring offsets for the PF.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 2886daec70ae..916a2b64e5f5 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -3755,9 +3755,11 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter) hlist_for_each_entry_safe(filter, node, node2, &adapter->fdir_filter_list, fdir_node) { ixgbe_fdir_write_perfect_filter_82599(hw, - &filter->filter, - filter->sw_idx, - filter->action); + &filter->filter, + filter->sw_idx, + (filter->action == IXGBE_FDIR_DROP_QUEUE) ? + IXGBE_FDIR_DROP_QUEUE : + adapter->rx_ring[filter->action]->reg_idx); } spin_unlock(&adapter->fdir_perfect_lock); |