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>

authored by Mitch A Williams and committed by Jeff Kirsher 5b7af02c fe6d4aa4

+16 -4
+16 -4
drivers/net/ethernet/intel/i40evf/i40evf_main.c
··· 1412 1412 schedule_work(&adapter->adminq_task); 1413 1413 } 1414 1414 1415 + /** 1416 + * i40evf_configure_rss - increment to next available tx queue 1417 + * @adapter: board private structure 1418 + * @j: queue counter 1419 + * 1420 + * Helper function for RSS programming to increment through available 1421 + * queus. Returns the next queue value. 1422 + **/ 1415 1423 static int next_queue(struct i40evf_adapter *adapter, int j) 1416 1424 { 1417 1425 j += 1; ··· 1459 1451 /* Populate the LUT with max no. of queues in round robin fashion */ 1460 1452 j = adapter->vsi_res->num_queue_pairs; 1461 1453 for (i = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++) { 1462 - lut = next_queue(adapter, j); 1463 - lut |= next_queue(adapter, j) << 8; 1464 - lut |= next_queue(adapter, j) << 16; 1465 - lut |= next_queue(adapter, j) << 24; 1454 + j = next_queue(adapter, j); 1455 + lut = j; 1456 + j = next_queue(adapter, j); 1457 + lut |= j << 8; 1458 + j = next_queue(adapter, j); 1459 + lut |= j << 16; 1460 + j = next_queue(adapter, j); 1461 + lut |= j << 24; 1466 1462 wr32(hw, I40E_VFQF_HLUT(i), lut); 1467 1463 } 1468 1464 i40e_flush(hw);