We can also confirm that switchdev is the answer to this.
You can also setup a Systemd Service to make sure it works everytime or on reboots.
create a new systemd service file:
nano /etc/systemd/system/switchdev.service
Put in:
#############START FILE CONTENTS BELOW#################
[Unit]
Description=Enable SwitchDev mode for Mellanox NICs
After=network.target
[Service]
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:41:00.0 mode switchdev
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:41:00.1 mode switchdev
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:81:00.0 mode switchdev
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:81:00.1 mode switchdev
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:01:00.0 mode switchdev
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:01:00.1 mode switchdev
RemainAfterExit=yes
Type=oneshot
[Install]
WantedBy=multi-user.target
#############END FILE CONTENTS ABOVE#################
Just double check the correct devlink execution path with: which devlink or command -v devlink
You can also check the correct NIC ids to put into the file with: devlink dev show
Then save the file, and then run these commands:
systemctl daemon-reload
systemctl enable switchdev.service
systemctl start switchdev.service
systemctl status switchdev.service
When no errors then reboot
Thank you so much for this work-around @joxx75 it really saved us a lot of stress and time
You can also setup a Systemd Service to make sure it works everytime or on reboots.
create a new systemd service file:
nano /etc/systemd/system/switchdev.service
Put in:
#############START FILE CONTENTS BELOW#################
[Unit]
Description=Enable SwitchDev mode for Mellanox NICs
After=network.target
[Service]
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:41:00.0 mode switchdev
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:41:00.1 mode switchdev
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:81:00.0 mode switchdev
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:81:00.1 mode switchdev
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:01:00.0 mode switchdev
ExecStart=/usr/sbin/devlink dev eswitch set pci/0000:01:00.1 mode switchdev
RemainAfterExit=yes
Type=oneshot
[Install]
WantedBy=multi-user.target
#############END FILE CONTENTS ABOVE#################
Just double check the correct devlink execution path with: which devlink or command -v devlink
You can also check the correct NIC ids to put into the file with: devlink dev show
Then save the file, and then run these commands:
systemctl daemon-reload
systemctl enable switchdev.service
systemctl start switchdev.service
systemctl status switchdev.service
When no errors then reboot
Thank you so much for this work-around @joxx75 it really saved us a lot of stress and time
