Mellanox ConnecX management in OPNsense

With OPNsense 19.1 there finally comes mlx4en driver supporting Mellanox ConnectX-3 and up cards.

To enable it open the file /boot/loader.conf.local via CLI and add:

mlx4en_load=“YES“

Now reboot your machine and you can have to reassign the interfaces.

 

To manage the firmware on your device you need the mft package from Mellanox. Go to http://www.mellanox.com/page/firmware_table_ConnectX3EN  and check your card for updated packages. If there are some download them to your appliances with ‚fetch‘ and ‚unzip‘ it’s contents.

Mellanox firmware tools can be downloaded here: http://www.mellanox.com/page/management_tools

Here are the required steps to install them (please replace with current version):

fetch http://www.mellanox.com/downloads/MFT/FreeBSD/mft-4.11.0-103.tgz
tar xvfz mft-4.11.0-103.tgz
cd mft-4.11.0-103
pkg install bash
bash install.sh
ln -s /usr/local/bin/python2.7 /usr/bin/python

 

Now check the PCI ID of your card(s):

root@OPNsense:~/mft-4.11.0-103 # /usr/bin/mst status
MST devices:
————
pci0:1:0:0 – MT27500 Family [ConnectX-3]
pci0:6:0:0 – MT27500 Family [ConnectX-3]

 

And query the version:

root@OPNsense:~ # /usr/bin/flint_ext -d pci0:1:0:0 q
Image type: FS2
FW Version(Running): 2.36.5000
FW Release Date: 5.9.2017
Product Version: 02.42.50.00
Rom Info: type=PXE version=3.4.752
Device ID: 4099
Description: Node Port1 Port2 Sys image
GUIDs: ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
MACs: 248a07f75b30 248a07f75b31
VSD:
PSID: MT_1080120023

 

To update the firmware, check you are in the directory where you extracted the firmware and execute (replace with your version and PCI ID):

root@OPNsense:~ # /usr/bin/flint_ext -d pci0:1:0:0 -i fw-ConnectX3-rel-2_42_5000-MCX312A-XCB_A2-A6-FlexBoot-3.4.752.bin b

Current FW version on flash: 2.36.5000
New FW version: 2.42.5000

Burning FS2 FW image without signatures – 48%

 

… reboot your machine and you are good 🙂