summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMitch A Williams <mitch.a.williams@intel.com>2014-03-28 06:49:02 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-04-11 06:23:25 -0700
commit5b7af02c26d84cf56dfd7e6906e244e31e92d593 (patch)
tree1dab8e85e1aa17a8aeff3c8cd8a145a85170cc9f /drivers
parentfe6d4aa437baf185bc98b83eaff229a3ac5d738c (diff)
downloadlinux-5b7af02c26d84cf56dfd7e6906e244e31e92d593.tar.bz2
i40evf: program RSS LUT correctly
A recent change broke the RSS LUT programming, causing it to be programmed with all 0. Correct this by actually assigning the incremented value back to the counter variable so that the increment will be remembered by the calling function. While we're at it, add a proper kernel-doc function comment to our helper function. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index e35e66ffa782..2797548fde0d 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1412,6 +1412,14 @@ restart_watchdog:
schedule_work(&adapter->adminq_task);
}
+/**
+ * i40evf_configure_rss - increment to next available tx queue
+ * @adapter: board private structure
+ * @j: queue counter
+ *
+ * Helper function for RSS programming to increment through available
+ * queus. Returns the next queue value.
+ **/
static int next_queue(struct i40evf_adapter *adapter, int j)
{
j += 1;
@@ -1451,10 +1459,14 @@ static void i40evf_configure_rss(struct i40evf_adapter *adapter)
/* Populate the LUT with max no. of queues in round robin fashion */
j = adapter->vsi_res->num_queue_pairs;
for (i = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++) {
- lut = next_queue(adapter, j);
- lut |= next_queue(adapter, j) << 8;
- lut |= next_queue(adapter, j) << 16;
- lut |= next_queue(adapter, j) << 24;
+ j = next_queue(adapter, j);
+ lut = j;
+ j = next_queue(adapter, j);
+ lut |= j << 8;
+ j = next_queue(adapter, j);
+ lut |= j << 16;
+ j = next_queue(adapter, j);
+ lut |= j << 24;
wr32(hw, I40E_VFQF_HLUT(i), lut);
}
i40e_flush(hw);