Commit 0d7da97
libibumad: allow choose port with state DOWN in case of explicit user port
[ Upstream commit 862aede ]
Today libibumad rejects ports that are not ACTIVE during selection, which
prevents users from targeting a specific port that is administratively DOWN.
This change permits selecting a port in DOWN state when the user has
explicitly specified the port and the device (e.g., by index/identifier).
Automatic port selection behavior is unchanged and will continue to prefer
only ACTIVE ports. Validation of the requested port’s existence and basic
attributes remains intact.
if user explicitly chose device name AND:
- port number
- port is 0 and device is switch
- Only one port for device
we skip the verification of port state.
This is mainly done to suport opensm standalone feature
Fixes: be54b52 ("libibumad: Add new API to support SMI/GSI seperation")
Signed-off-by: Asaf Mazor <amazor@nvidia.com>
Signed-off-by: Nicolas Morey <nmorey@suse.com>1 parent ae50053 commit 0d7da97
1 file changed
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1568 | 1568 | | |
1569 | 1569 | | |
1570 | 1570 | | |
1571 | | - | |
| 1571 | + | |
1572 | 1572 | | |
1573 | | - | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
1574 | 1583 | | |
1575 | 1584 | | |
1576 | | - | |
| 1585 | + | |
| 1586 | + | |
1577 | 1587 | | |
1578 | 1588 | | |
1579 | 1589 | | |
| |||
1583 | 1593 | | |
1584 | 1594 | | |
1585 | 1595 | | |
1586 | | - | |
| 1596 | + | |
1587 | 1597 | | |
1588 | | - | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
1589 | 1601 | | |
1590 | 1602 | | |
1591 | 1603 | | |
| |||
1648 | 1660 | | |
1649 | 1661 | | |
1650 | 1662 | | |
1651 | | - | |
| 1663 | + | |
1652 | 1664 | | |
1653 | 1665 | | |
1654 | 1666 | | |
| |||
0 commit comments