OPNsense Forum

English Forums => Hardware and Performance => Topic started by: DaniS. on October 21, 2022, 07:49:42 AM

Title: Problem installing Intel NIC drivers
Post by: DaniS. on October 21, 2022, 07:49:42 AM

Hi,


I am a total newbie in FreeBSD and my linux knowledge isn't that great either.


Issue:
I have a 25G Intel E810-XXVDA2 NIC that performs DL around 5G and Upload around 8G (speedtest directly on the OPNSense). I read in the forum that I have to update the NIC firmware and drivers have to be updated and the DDP allowed. The FW update worked fine but when I try to install/compile the driver by the divers provided how-to I get the following error:




root@OPNsense:~/ice-1.35.5 # make
make: "/root/ice-1.35.5/Makefile" line 28: Unable to locate the running kernel build directory. Kernel options may not be accurate.
make: "/usr/share/mk/bsd.sysdir.mk" line 15: Unable to locate the kernel source tree. Set SYSDIR to override.


make: stopped in /root/ice-1.35.5




Can anyone help me out?


Best regards
Dan
Title: Re: LAN DNS resolution fails through OpenVPN when Adguard is enabled
Post by: Patrick M. Hausen on October 21, 2022, 09:49:44 AM
Use a separate FreeBSD 13.1 machine with source distribution installed to build the driver. Can be done in a VM with e.g. Vagrant.
Title: Re: Problem installing Intel NIC drivers
Post by: DaniS. on October 22, 2022, 08:01:07 AM
Hi pmhausen,

thx for your reply. I tried that now but I don't get what I have to copy back and install onto the OPNsense.

Best regards
Dan
Title: Re: Problem installing Intel NIC drivers
Post by: franco on October 22, 2022, 10:21:14 AM
If the compilation wants the kernel tree you can give it what it wants? :)

# opnsense-code src


Cheers,
Franco
Title: Re: Problem installing Intel NIC drivers
Post by: Patrick M. Hausen on October 22, 2022, 12:08:50 PM
I would not want to compile on my production firewall  ;)

DaniS, compiling should produce a file named if_something.ko - that's the kernel module you need to copy to /boot/modules on your OPNsense.
Title: Re: Problem installing Intel NIC drivers
Post by: DaniS. on October 23, 2022, 11:20:21 AM
Thanks pmhausen.

Unfortunately it did not work. I copied the if_ice.ko to /boot/modules/. I still got the "low" performance and kldstat does not list the module.

Id Refs Address                Size Name
1   65 0xffffffff80200000  215db98 kernel
2    1 0xffffffff8235f000     3b18 pflog.ko
3    3 0xffffffff82363000    741a8 pf.ko
4    1 0xffffffff823d8000     e318 pfsync.ko
5    1 0xffffffff823e7000     e4d0 if_bridge.ko
6    2 0xffffffff823f6000     7870 bridgestp.ko
7    1 0xffffffff823fe000     ba48 if_gre.ko
8    1 0xffffffff8240a000     4b58 if_enc.ko
9    1 0xffffffff8240f000    181d0 if_lagg.ko
10    2 0xffffffff82428000     3538 if_infiniband.ko
11    1 0xffffffff8242c000     f460 carp.ko
12    1 0xffffffff828e5000     3378 acpi_wmi.ko
13    1 0xffffffff828e9000    87098 if_iwlwifi.ko
14    1 0xffffffff82971000     3218 intpm.ko
15    1 0xffffffff82975000     2180 smbus.ko
16    1 0xffffffff82978000     4d00 ng_ubt.ko
17    3 0xffffffff8297d000     aac8 netgraph.ko
18    2 0xffffffff82988000     a238 ng_hci.ko
19    2 0xffffffff82993000     25a8 ng_bluetooth.ko
20    1 0xffffffff82996000     2340 uhid.ko
21    1 0xffffffff82999000     3380 usbhid.ko
22    1 0xffffffff8299d000     31f8 hidbus.ko
23    1 0xffffffff829a1000     3320 wmt.ko
24    1 0xffffffff829a5000     3160 amdtemp.ko
25    1 0xffffffff829a9000     2138 amdsmn.ko

Title: Re: Problem installing Intel NIC drivers
Post by: Patrick M. Hausen on October 23, 2022, 12:50:58 PM
You need to set a tunable to load it at boot time.

if_ice_load YES

in System > Settings > Tunables

then reboot.
Title: Re: Problem installing Intel NIC drivers
Post by: franco on October 24, 2022, 07:56:37 AM
Quote from: pmhausen on October 22, 2022, 12:08:50 PM
I would not want to compile on my production firewall  ;)

If you suggest a FreeBSD (VM) to compile you might as well use a OPNsense (VM) to compile. At least that would be the "native" way to compile it. ;)


Cheers,
Franco
Title: Re: Problem installing Intel NIC drivers
Post by: DaniS. on October 31, 2022, 08:41:56 AM
Reporting back for anyone else trying to get this to work. Here is what I did.

@pmhausen: Thanks for your advice, wouldn't been able to do it on my own.

1. I compiled the drivers on a FreeBSD VM like pmhausen suggested.
2. Copied the "if_ice.ko" to /boot/modules/ on the OPNsense
3. Created the file /boot/loader.conf.local and added these 2 lines:
if_ice_load="YES"
ice_ddp_load="YES"
4. reboot

Hope this helps anyone.
Best regards.
Dan

Title: Re: Problem installing Intel NIC drivers
Post by: Patrick M. Hausen on October 31, 2022, 08:51:10 AM
Quote from: DaniS. on October 31, 2022, 08:41:56 AM
3. Created the file /boot/loader.conf.local and added these 2 lines:
if_ice_load="YES"
ice_ddp_load="YES"
Don't do this. Instead in the UI go to System > Settings > Tunables and add the two tunables there.
This way your settings will survive updates and be part of a configuration backup.