Commit 558c2d5
mlxsw: spectrum: Store local port to module mapping during init
The port netdevs are each associated with a different local port number
in the device. These local ports are grouped into groups of 4 (e.g.
(1-4), (5-8)) called clusters. The cluster constitutes the one of two
possible modules they can be mapped to. This mapping is board-specific
and done by the device's firmware during init.
When splitting a port by 4, the device requires us to first unmap all
the ports in the cluster and then map each to a single lane in the module
associated with the port netdev used as the handle for the operation.
This means that two port netdevs will disappear, as only 100Gb/s (4
lanes) ports can be split and we are guaranteed to have two of these
((1, 3), (5, 7) etc.) in a cluster.
When unsplit occurs we need to reinstantiate the two original 100Gb/s
ports and map each to its origianl module. Therefore, during driver init
store the initial local port to module mapping, so it can be used later
during unsplitting.
Note that a by 2 split doesn't require us to store the mapping, as we
only need to reinstantiate one port whose module is known.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 3e9b27b commit 558c2d5
2 files changed
+16
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
309 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
310 | 311 | | |
311 | | - | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
| 320 | + | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| |||
1365 | 1366 | | |
1366 | 1367 | | |
1367 | 1368 | | |
1368 | | - | |
1369 | 1369 | | |
1370 | 1370 | | |
1371 | 1371 | | |
| |||
1416 | 1416 | | |
1417 | 1417 | | |
1418 | 1418 | | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | 1419 | | |
1433 | 1420 | | |
1434 | 1421 | | |
| |||
1496 | 1483 | | |
1497 | 1484 | | |
1498 | 1485 | | |
1499 | | - | |
1500 | | - | |
1501 | 1486 | | |
1502 | 1487 | | |
1503 | 1488 | | |
| |||
1559 | 1544 | | |
1560 | 1545 | | |
1561 | 1546 | | |
| 1547 | + | |
1562 | 1548 | | |
1563 | 1549 | | |
1564 | 1550 | | |
| |||
1568 | 1554 | | |
1569 | 1555 | | |
1570 | 1556 | | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
1571 | 1564 | | |
1572 | 1565 | | |
1573 | 1566 | | |
1574 | 1567 | | |
1575 | 1568 | | |
1576 | 1569 | | |
1577 | 1570 | | |
| 1571 | + | |
1578 | 1572 | | |
1579 | 1573 | | |
1580 | 1574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
0 commit comments