Mellanox ConnectX-3 w/FreeBSD 11.2 p6

Hi Everyone,

I just setup PfSense 2.4.4 p2 with FreeBSD 11.2 Release p6 on an HP server node. Now I am looking to install the drivers for a dual 40gbe port Mellanox network card that I have in the slot.

I followed the tutorials online to install FreeBSD in a vm and compile the drivers. However I noticed mlxen module is no where to be found in any folder and when I go to compile.

I can compile mlx4, mlx4en, mlx5, and mlx5en but no mlxen. I have been checking online everywhere to see why as I am on the correct branch for 11.2 and did git clone in the vm so everything else worked just fine.

This card is new to me and first time going through this process before.

Any thoughts? or advice on where I can best find that module? I am searching through the forum to see if this was answered before unless I missed it.

Thank you!
 
No need to compile anything. Drivers are already built.
 
Thank you for the reply and great to hear drivers are already built. This is what I followed initially:

So basically I just need to add to loader.conf the necessary lines for mlx4en?

Such as you mentioned in that thread link?
/etc/rc.conf
ifconfig_mlxen0="DHCP"

/boot/loader.conf
mlx4en_load="YES"

Also I was following online it is suggested to do a kldload mlxen to load the drivers and the problem is mlxen does not exist on my pfsense box. I did previously compile and transfer mlx4, mlx4en, mlx5, and mlx5en ko files before I posted this thread.

This is what I was following previously and noticed more people compiling drivers for FreeBSD 11+.
https://www.freebsd.org/cgi/man.cgi?query=mlx4en&sektion=&manpath=freebsd-release-ports (I see it says run kldload mlx4en)
 
Okay when I try to do a kldload mlx4en this is the response I get in PfSense shell see attached. Version mismatch and unsupported file type. I am thinking when I compiled the drivers I transferred over to /boot/kernel/ they are from 11.2p4 FreeBSD and not p6 would that have anything to do with it?
 

Attachments

  • Screen Shot 2019-05-02 at 1.45.21 PM.png
    Screen Shot 2019-05-02 at 1.45.21 PM.png
    138.1 KB · Views: 491
I have never copied over modules before. I did not think it was possible, but I see it in this post too.
Patch level should not matter unless the patch was related to the the module.

We have strayed over the line here. pfSense is not an appropriate support topic here. Don't want to be a jerk but it is the rule.
Without rules we have anarchy.
 
The answer lies here in the manual for module(9)
MODULE_DEPEND(foo, bar, 1, 3, 4);
So modules have dependencies. Now look at the messages you presented.
linuxkpi and mlx4 modules are also going to be needed by pfSense. They are dependencies.
You might need to run through it several times until you have copied over all depend modules.
linuxkpi might have its own set of dependencies.
 
Thank you and sorry about that I was not sure how much I could mention about that software but will keep it out of here understood.

I see you mean run it through compiling the drivers or adding them on directly? Sorry still figuring out whether I should get it from the FreeBSD VM or do it directly. Now are they should be all located on the latest release 11.2 p6.
 
It looks like you can copy the modules over directly. I wouldn't worry about the patch level.
Copy those two ko's over and reboot, see if it compains about any more missing links.
 
Okay I will check tomorrow morning back at the office. Thank you for the help. I will let you know the results.
 
Okay some reason looking for linuxkpi to create a ko but unable to locate it as of yet. I am completely newbie to all this. Thought it would be in the modules folder but nothing there. I have it under boot/kernel. Ah ok let me try transferring again. I have attached my results after copying over new linuxkpi, mlx4, mlx4en ko files into boot/kernel/
 

Attachments

  • Screen Shot 2019-05-03 at 7.09.01 PM.png
    Screen Shot 2019-05-03 at 7.09.01 PM.png
    740.6 KB · Views: 504
  • Screen Shot 2019-05-03 at 7.09.08 PM.png
    Screen Shot 2019-05-03 at 7.09.08 PM.png
    750 KB · Views: 565
Is there a better route than instead of compiling the drivers? If the modules are already with FreeBSD 11.2 I would think I could load them on the main FreeBSD machine itself.
 
Progress added the linuxkpi ko again and have a different message this time.

mlx4en.ko: Unsupported file layout
 
Okay I believe figured it out here is a screenshot of the ports getting initialized after running kldload mlx4en command. Are there any further steps required?
 

Attachments

  • Screen Shot 2019-05-03 at 8.00.50 PM.png
    Screen Shot 2019-05-03 at 8.00.50 PM.png
    1.7 MB · Views: 490
Not that I know of. Since your using that other OS you might not use the /etc/rc.conf setting and just use the /boot/loader.conf part.
That starts the driver, then I would use the WebGUI to configure it.
Consider me out. You must use the other forum now.
 
Back
Top