Skip to content

Commit 0da6090

Browse files
Jesus Sanchez-PalenciaJeff Kirsher
authored andcommitted
igb: Clarify idleslope config constraints
By design, the idleslope increments are restricted to 16.384kbps steps. Add a comment to igb_main.c making that explicit and add one example that illustrates the impact of that. Signed-off-by: Jesus Sanchez-Palencia <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent b701cac commit 0da6090

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,20 @@ static void igb_configure_cbs(struct igb_adapter *adapter, int queue,
17441744
* value = idleSlope * 61034
17451745
* ----------------- (E6)
17461746
* 1000000
1747+
*
1748+
* NOTE: For i210, given the above, we can see that idleslope
1749+
* is represented in 16.38431 kbps units by the value at
1750+
* the TQAVCC register (1Gbps / 61034), which reduces
1751+
* the granularity for idleslope increments.
1752+
* For instance, if you want to configure a 2576kbps
1753+
* idleslope, the value to be written on the register
1754+
* would have to be 157.23. If rounded down, you end
1755+
* up with less bandwidth available than originally
1756+
* required (~2572 kbps). If rounded up, you end up
1757+
* with a higher bandwidth (~2589 kbps). Below the
1758+
* approach we take is to always round up the
1759+
* calculated value, so the resulting bandwidth might
1760+
* be slightly higher for some configurations.
17471761
*/
17481762
value = DIV_ROUND_UP_ULL(idleslope * 61034ULL, 1000000);
17491763

0 commit comments

Comments
 (0)