Commit 87a5112
net/mlx5e: Use standard unit definitions for bandwidth conversion
MLX5E_100MB and MLX5E_1GB defines are confusing, MLX5E_100MB is not
equal to 100 * MEGA, and MLX5E_1GB is not equal to one GIGA, as they
hide the Kbps rate conversion required for ieee_maxrate.
Replace hardcoded bandwidth conversion values with standard unit
definitions from linux/units.h. Rename MLX5E_100MB/MLX5E_1GB to
MLX5E_100MB_TO_KB/MLX5E_1GB_TO_KB to clarify these are conversion
factors to Kbps, not absolute bandwidth values.
Signed-off-by: Gal Pressman <[email protected]>
Reviewed-by: Nimrod Oren <[email protected]>
Signed-off-by: Tariq Toukan <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 53f7a77 commit 87a5112
1 file changed
+9
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | | - | |
| 41 | + | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
572 | 573 | | |
573 | 574 | | |
574 | 575 | | |
575 | | - | |
| 576 | + | |
576 | 577 | | |
577 | 578 | | |
578 | | - | |
| 579 | + | |
579 | 580 | | |
580 | 581 | | |
581 | 582 | | |
| |||
614 | 615 | | |
615 | 616 | | |
616 | 617 | | |
617 | | - | |
618 | | - | |
| 618 | + | |
| 619 | + | |
619 | 620 | | |
620 | 621 | | |
621 | 622 | | |
| |||
624 | 625 | | |
625 | 626 | | |
626 | 627 | | |
627 | | - | |
| 628 | + | |
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
631 | 632 | | |
632 | | - | |
| 633 | + | |
633 | 634 | | |
634 | 635 | | |
635 | 636 | | |
| |||
0 commit comments