Commit a41b962
mlxsw: spectrum_buffers: Introduce shared buffer ops
The size of the internal buffer is currently calculated in the SPAN module.
Logically it belongs to the spectrum_buffers module, where it should be
moved. However, that being a chip-specific operation, it needs dynamic
dispatch. There currently is a chip-specific structure for description of
shared buffer values, struct mlxsw_sp_sb_vals. However placing ops into
this structure would be confusing. Therefore introduce a new per-chip
structure, currently empty, and initialize the ops pointer as appropriate.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 0cda1a9 commit a41b962
File tree
3 files changed
+21
-0
lines changed- drivers/net/ethernet/mellanox/mlxsw
3 files changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2697 | 2697 | | |
2698 | 2698 | | |
2699 | 2699 | | |
| 2700 | + | |
2700 | 2701 | | |
2701 | 2702 | | |
2702 | 2703 | | |
| |||
2725 | 2726 | | |
2726 | 2727 | | |
2727 | 2728 | | |
| 2729 | + | |
2728 | 2730 | | |
2729 | 2731 | | |
2730 | 2732 | | |
| |||
2751 | 2753 | | |
2752 | 2754 | | |
2753 | 2755 | | |
| 2756 | + | |
2754 | 2757 | | |
2755 | 2758 | | |
2756 | 2759 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
514 | 516 | | |
515 | 517 | | |
516 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
517 | 523 | | |
518 | 524 | | |
519 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
1101 | 1104 | | |
1102 | 1105 | | |
1103 | 1106 | | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
1104 | 1116 | | |
1105 | 1117 | | |
1106 | 1118 | | |
| |||
0 commit comments