OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: CIR-Engineering on November 27, 2022, 09:57:00 AM

Title: How to install Mellanox MFT?
Post by: CIR-Engineering on November 27, 2022, 09:57:00 AM
I have been stuck trying to install Mellanox MFT on OPNsesne and know I am missing something stupid.  I followed this old post to this old guide:

https://forum.opnsense.org/index.php?topic=10661.0
https://www.routerperformance.net/opnsense/mellanox-connecx-management-in-opnsense/

This is what I get:

root@OPNsense:~ # fetch https://www.mellanox.com/downloads/MFT/mft-4.22.0-96.tgz
mft-4.22.0-96.tgz                                       92 MB   35 MBps    02s
root@OPNsense:~ # tar xvfz mft-4.22.0-96.tgz
x mft-4.22.0-96/
x mft-4.22.0-96/README
x mft-4.22.0-96/install.sh
x mft-4.22.0-96/mft-4.22.0-96.freebsd10_amd64.tgz
x mft-4.22.0-96/LICENSE.txt
root@OPNsense:~ # cd mft-4.22.0-96
root@OPNsense:~/mft-4.22.0-96 # ls
5.2.9                                   LICENSE.txt                             README                                  install.sh                              mft-4.22.0-96.freebsd10_amd64.tgz
root@OPNsense:~/mft-4.22.0-96 # pkg install bash
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
root@OPNsense:~/mft-4.22.0-96 # bash install.sh
install.sh: line 16: cd: install.sh: Not a directory
-I- Detecting previous version of MFT ...
-I- Running /usr/bin/mft_uninstall.sh ...
install.sh: line 21: /usr/bin/mft_uninstall.sh: cannot execute: required file not found
-E- Install failed
root@OPNsense:~/mft-4.22.0-96 #


This is what is in install.sh:
root@OPNsense:~/mft-4.22.0-96 # nano install.sh
  GNU nano 6.4                                      install.sh
#!/bin/bash

tar --version >/dev/null 2>&1
if [ $? != 0 ]; then
    echo "-E- There is no 'tar' on your system. Please install 'tar' and try again"
    exit 1
fi

g_os_release=""
rel=$(uname -r)
arch=$(uname -p)
install_python_bins=0
python_bins=("mlxfwreset" "fwtrace")
MLXFWRESET="mlxfwreset"
BIN_PATH="/usr/bin"
cd "${0%*/*}"
echo "-I- Detecting previous version of MFT ..."
uninstaller="`which mft_uninstall.sh`"
if [[ -f ${uninstaller} ]] ; then
    echo "-I- Running ${uninstaller} ..."
    ${uninstaller}
    if [ $? != 0 ]; then
        echo "-E- Install failed"
        exit 1
    fi
fi
if [[ "$rel" == *9.1* ]];
then
    g_os_release="9.1_$arch";
elif [[ "$rel" == *10.1* ]];


Help please.
craigr
Title: Re: How to install Mellanox MFT?
Post by: CIR-Engineering on November 27, 2022, 10:20:47 AM
I actually may have it.  I had to uninstall and then reinstall.  I'm waiting on a new Mellanox card.  When it arrives, I will find out.  Right now, I am getting this which is much better than the nothing I was getting before.

root@OPNsense:~/mft-4.22.0-96 # /usr/bin/mst status
-E- No MST devices were found or MST modules are not loaded.
    You may need to run 'mst server start' to load MST modules.
root@OPNsense:~/mft-4.22.0-96
Title: Re: How to install Mellanox MFT?
Post by: CIR-Engineering on December 05, 2022, 06:09:15 AM
Card's in, all good, MFT is working and the firmware is now updated.

Is there a command to view the optics status?  And can Mellanox view optics status on non-Mellanox coded optics?

Thanks,
craigr
Title: Re: How to install Mellanox MFT?
Post by: CIR-Engineering on December 05, 2022, 06:58:29 AM
Got this:

root@OPNsense:~ # ifconfig -v mlxen0
mlxen0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: WAN
        options=8c00a8<VLAN_MTU,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE>
        ether [b]REMOVED[/b]
        inet6 [b]REMOVED[/b]%mlxen0 prefixlen 64 scopeid 0x6
        inet [b]REMOVED[/b] netmask 0xfffffff8 broadcast [b]REMOVED[/b]
        media: Ethernet autoselect (10Gbase-CX4 <full-duplex,rxpause,txpause>)
        status: active
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        plugged: SFP/SFP+/SFP28 10G Base-SR (LC)
        vendor: OEM PN: SFP-10G-SR SN: CSF101L34485 DATE: 2021-03-05
root@OPNsense:~ #

But I would like temperature and power usage.  Are there any Mellanox tools commands that can provide my missing info.  Do I need a Mellanox coded transceiver?
Title: Re: How to install Mellanox MFT?
Post by: CIR-Engineering on December 06, 2022, 11:02:44 PM
It's been a pleasure speaking with you all  :-X 

If someone knows commands to get more information on the transceivers plugged into a Mellanox 3, I would highly appreciate any pointers.  I bought two different transceivers from Fiber-Store on Amazon that said they were Mellanox coded but were not.  One was coded "FIBER-STORE" the other was "OPSTRAN."  I have returned them both.  Here is the output from the "OPSTRAN"

root@OPNsense:~ # ifconfig -v mlxen0
mlxen0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: WAN
        options=8c00a8<VLAN_MTU,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE>
        ether [b]REMOVED[/b]
        inet6 [b]REMOVED[/b]%mlxen0 prefixlen 64 scopeid 0x6
        inet [b]REMOVED[/b] netmask 0xfffffff8 broadcast [b]REMOVED[/b]
        media: Ethernet autoselect (10Gbase-CX4 <full-duplex,rxpause,txpause>)
        status: active
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        plugged: SFP/SFP+/SFP28 10G Base-SR (LC)
        vendor: OPSTRAN PN: SFP-10G-T-ME SN: FS2210260290 DATE: 2022-10-27
        module temperature: 0.00 C voltage: 0.00 Volts
        lane 1: RX power: 0.00 mW (-inf dBm) TX bias: 0.00 mA
root@OPNsense:~ #
Title: Re: How to install Mellanox MFT?
Post by: CIR-Engineering on December 06, 2022, 11:05:22 PM
Quote from: CIR-Engineering on December 05, 2022, 06:58:29 AM
Got this:

root@OPNsense:~ # ifconfig -v mlxen0
mlxen0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: WAN
        options=8c00a8<VLAN_MTU,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE>
        ether [b]REMOVED[/b]
        inet6 [b]REMOVED[/b]%mlxen0 prefixlen 64 scopeid 0x6
        inet [b]REMOVED[/b] netmask 0xfffffff8 broadcast [b]REMOVED[/b]
        media: Ethernet autoselect (10Gbase-CX4 <full-duplex,rxpause,txpause>)
        status: active
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        plugged: SFP/SFP+/SFP28 10G Base-SR (LC)
        vendor: OEM PN: SFP-10G-SR SN: CSF101L34485 DATE: 2021-03-05
root@OPNsense:~ #

But I would like temperature and power usage.  Are there any Mellanox tools commands that can provide my missing info.  Do I need a Mellanox coded transceiver?

Also FWIW, this same transceiver in my Brocade switch gives me temperature and current readouts.
Title: Re: How to install Mellanox MFT?
Post by: cookiemonster on December 07, 2022, 11:36:07 AM
I don't have any of these nice interfaces but your question seems generic enough.
It seems your question is more about what are the capabilities of the driver ie. to show certain attributes of the card. Those are best directed at the driver provider, OPN just loads it.