Commit 5b7af02c authored by Mitch A Williams's avatar Mitch A Williams Committed by Jeff Kirsher

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: default avatarMitch Williams <mitch.a.williams@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent fe6d4aa4
...@@ -1412,6 +1412,14 @@ static void i40evf_watchdog_task(struct work_struct *work) ...@@ -1412,6 +1412,14 @@ static void i40evf_watchdog_task(struct work_struct *work)
schedule_work(&adapter->adminq_task); 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) static int next_queue(struct i40evf_adapter *adapter, int j)
{ {
j += 1; j += 1;
...@@ -1451,10 +1459,14 @@ static void i40evf_configure_rss(struct i40evf_adapter *adapter) ...@@ -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 */ /* Populate the LUT with max no. of queues in round robin fashion */
j = adapter->vsi_res->num_queue_pairs; j = adapter->vsi_res->num_queue_pairs;
for (i = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++) { for (i = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++) {
lut = next_queue(adapter, j); j = next_queue(adapter, j);
lut |= next_queue(adapter, j) << 8; lut = j;
lut |= next_queue(adapter, j) << 16; j = next_queue(adapter, j);
lut |= next_queue(adapter, j) << 24; 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); wr32(hw, I40E_VFQF_HLUT(i), lut);
} }
i40e_flush(hw); i40e_flush(hw);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment