Check current mode
Use ibstat and inspect Link layer for each port.
Switch mode
Use Mellanox tools (for example mlxconfig) to set port type and reboot/reinit if required.
Typical workflow:
- query current configuration
- set target port mode (IB/Ethernet)
- restart driver or reboot
- verify with
ibstat