diff options
| -rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40evf_main.c | 20 |
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: | |||
| 1412 | schedule_work(&adapter->adminq_task); | 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 | static int next_queue(struct i40evf_adapter *adapter, int j) | 1423 | static int next_queue(struct i40evf_adapter *adapter, int j) |
| 1416 | { | 1424 | { |
| 1417 | j += 1; | 1425 | j += 1; |
| @@ -1451,10 +1459,14 @@ static void i40evf_configure_rss(struct i40evf_adapter *adapter) | |||
| 1451 | /* Populate the LUT with max no. of queues in round robin fashion */ | 1459 | /* Populate the LUT with max no. of queues in round robin fashion */ |
| 1452 | j = adapter->vsi_res->num_queue_pairs; | 1460 | j = adapter->vsi_res->num_queue_pairs; |
| 1453 | for (i = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++) { | 1461 | for (i = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++) { |
| 1454 | lut = next_queue(adapter, j); | 1462 | j = next_queue(adapter, j); |
| 1455 | lut |= next_queue(adapter, j) << 8; | 1463 | lut = j; |
| 1456 | lut |= next_queue(adapter, j) << 16; | 1464 | j = next_queue(adapter, j); |
| 1457 | lut |= next_queue(adapter, j) << 24; | 1465 | lut |= j << 8; |
| 1466 | j = next_queue(adapter, j); | ||
| 1467 | lut |= j << 16; | ||
| 1468 | j = next_queue(adapter, j); | ||
| 1469 | lut |= j << 24; | ||
| 1458 | wr32(hw, I40E_VFQF_HLUT(i), lut); | 1470 | wr32(hw, I40E_VFQF_HLUT(i), lut); |
| 1459 | } | 1471 | } |
| 1460 | i40e_flush(hw); | 1472 | i40e_flush(hw); |
