• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Mellanox MT26448

Groak

New Member


Messages: 4

#1
I hope this isn't a dumb question BUT... How do I configure a Mellanox MT26448 10GigE card on FreeBSD 11.1?

I have the card listed in the pciconf listing:

none2@pci0:7:0:0: class=0x020000 card=0x001515b3 chip=0x675015b3 rev=0xb0 hdr=0x00
vendor = 'Mellanox Technologies'
device = 'MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s]'
class = network
subclass = ethernet

You can see that no driver has recognised it.

I thought that the mlxen drivers were built into 11.1? I am running:
FreeBSD medusa 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug 9 11:55:48 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

The card is not listed in the ifconfig list (as expected since it has no driver connected).

I have done a lot of googling and cannot seem to work it out.
Any help would really be appreciated.
Thanks.
 

Groak

New Member


Messages: 4

#2
I think a partial answer is that I need to compile and load the mlx4 and mlx4en modules. They are in the 11.1 source tree.

I have compiled the modules and copied to /boot/kernel.

When I kldload either module I get the errors:

Jan 27 16:48:30 medusa kernel: KLD mlx4.ko: depends on kernel - not available or version mismatch
Jan 27 16:48:30 medusa kernel: linker_load_file: Unsupported file type
Jan 27 16:49:24 medusa kernel: KLD mlxen.ko: depends on kernel - not available or version mismatch
Jan 27 16:49:24 medusa kernel: linker_load_file: Unsupported file type


How do I update the source tree to 11.1-RELEASE-p1? Is that the problem?
 

Phishfry

Son of Beastie

Thanks: 857
Messages: 2,622

#3
What you need is a custom kernel with the modules compiled in.
https://www.freebsd.org/doc/handbook/kernelconfig-building.html

So backup the default kernconf 'GENERIC' and add lines in your new kernconf like this:
Code:
device          mlx4ib          # Mellanox ConnectX HCA InfiniBand
device          mlxen           # Mellanox ConnectX HCA Ethernet
Follow the instructions from there. I am unsure if the device names I used above are correct.

Here is a site where they show details.
http://ronny-mueller.com/2017/02/10...anox-connectx-2-en-nic-671798-001-in-freebsd/
I prefer to build the modules into the kernel instead of dynamically loading them.

How do I update the source tree to 11.1-RELEASE-p1? Is that the problem?
This could be your problem if you are using an older version.
The p1 is not important unless the patch touched this driver. (doubtful)
Source code is automatically patched by freebsd-update when applying security patches.
 

Groak

New Member


Messages: 4

#4
Thanks Phishfry. I am trying your suggestion now.

Building with mlxen or mlxca generates linking errors such as this:
Code:
mthca_av.o: In function `tavor_rate_to_ib':
/usr/src/sys/ofed/drivers/infiniband/hw/mthca/mthca_av.c:90: undefined reference to `mult_to_ib_rate'
I had tried to compile the kernel following the instructions in man page for mlx4en. It says to include:

Code:
options COMPAT_LINUXKPI
device mlx4
device mlx4en
Adding the above three lines results in an immediate "not found" error for both device drivers when you start the make.

In Aug2014 the mlx4 and mlx4en driver apparently did work according to this thread: 47685" href="/index.php?threads/47685/">Thread 47685

Any suggestions on the additional steps to build the mlx4 driver as per the man page for mlx4en(4)?
 
Top