Skip to content

Commit

Permalink
ixgbe: Limit reporting of redirection table if SR-IOV is enabled
Browse files Browse the repository at this point in the history
The hardware redirection table can support more queues then the PF
currently has when SR-IOV is enabled.  In order to account for this use the
RSS mask to trim of the bits that are not used.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Sep 23, 2016
1 parent 3b00da0 commit fa81da7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2947,9 +2947,13 @@ static u32 ixgbe_rss_indir_size(struct net_device *netdev)
static void ixgbe_get_reta(struct ixgbe_adapter *adapter, u32 *indir)
{
int i, reta_size = ixgbe_rss_indir_tbl_entries(adapter);
u16 rss_m = adapter->ring_feature[RING_F_RSS].mask;

if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
rss_m = adapter->ring_feature[RING_F_RSS].indices - 1;

for (i = 0; i < reta_size; i++)
indir[i] = adapter->rss_indir_tbl[i];
indir[i] = adapter->rss_indir_tbl[i] & rss_m;
}

static int ixgbe_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
Expand Down

0 comments on commit fa81da7

Please sign in to comment.