How to install drivers for a NIC? (AQtion AQC107/XG-C100C)

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
In the GUI, under System | Tunables
 

guemi

Dabbler
Joined
Apr 16, 2020
Messages
48
In the GUI, under System | Tunables
1588107999810.png



I did so, it still would not load so I had to go and run the if_atlantic.ko file with kldload. :#

Do I need to place that file somewhere? Right now it is in /root
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
Normally you should place Kernel modules (drivers) in /boot/kernel .

You also should pay attention to the capitalization... I see you used if_atlantic_Load as the variable... that's not at all the same as if_atlantic_load.
 

guemi

Dabbler
Joined
Apr 16, 2020
Messages
48
Got it to work, but the speeds are going up to 850 MB/s only on a 10 gbit/s link and then at the middle of the transfer, network will entirely drop (I was running icmp ping which also lost connection).

I did some forum searching and it seems like unsupported OOB NIC's can cause this.

Anyone had similar problems with aquantia?

Might be better off buying some other NIC's for the machine, any recommendations on 10 gbit/s ones? Running it in LACP so need 2.
 

guemi

Dabbler
Joined
Apr 16, 2020
Messages
48
Normally you should place Kernel modules (drivers) in /boot/kernel .

You also should pay attention to the capitalization... I see you used if_atlantic_Load as the variable... that's not at all the same as if_atlantic_load.


Silly me.

I saw something about this being nullified / removed in case of a system update, would this be the case even with an "official" driver loaded this way?

It worked on multiple reboots, but I don't know if updating from 11.2 to 11.3 will cause harm?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
On really old versions, those directories were wiped out and entirely replaced at boot since the system was run in RAM. That changed (in 9.10, I think) to not be the case and files stored there remain through updates.

What does get nailed is edits to rc.conf or stuff like that to files that are controlled by the appliance from its database and re-written at boot or other special occasions. Using tunables is the supported way to work with that process.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
So this driver still is not natively supported by FreeNAS?
I expect not, but feel free to investigate. Driver support tends to arrive rather slowly and only for "mainstream enterprise hardware". FreeBSD doesn't get a lot of love from hardware vendors and is often an afterthought if drivers are supplied at all. Those who treat it seriously get that respect returned in terms of driver inclusion, which makes its way to FreeNAS in reasonable time, but for less integrated vendors, it can take ages or not happen at all.
 
Last edited:

lotustechie

Dabbler
Joined
Jun 3, 2020
Messages
27
I expect not, but feel free to investigate. Driver support tends to arrive rather slowly and only for "mainstream enterprise hardware". FreeBSD doesn't get a lot of love from hardware vendors and is often and afterthought if drivers are supplied at all. Those who treat it seriously get that respect returned in terms of driver inclusion, which makes its way to FreeNAS in reasonable time, but for less integrated vendors, it can take ages or not happen at all.
I've been using Linux for years and this is my first experience with FreeBSD. It seems like the driver has been out there for a while based on the links that contributors have provided in this and other threads. I'm legitimately surprised that it hasn't been added to the base OS yet.

There have been a few posts on how to add it manually. Is there a right way? Is there a permanent way? Is there a KB anywhere on how to do it?
 

JLoges

Cadet
Joined
Aug 25, 2020
Messages
1
Dear appliance,

do you still have the setup running with freenas 11.3? I am trying to this using the following device: https://www.qnap.com/en/product/qna-uc5g1t
and do not get the device enabled, although I followed all mentioned procedures mentioned in this thread.

Regards,
Joerg

Installing port is as easy as typing pkg install aquantia-atlantic-kmod-0.0.5 and adding if_atlantic_load="YES" to /boot/loader.conf.
Tried this way and Luckas attached KO file with success on FreeNAS 11.2 and 11.3. The official package is compatible with FreeBSD 11, 12, 13.


# pkg search aquantia
aquantia-atlantic-kmod-0.0.5 Aquantia AQtion (Atlantic) Network Driver (Development Preview)
# pkg install aquantia-atlantic-kmod-0.0.5
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
aquantia-atlantic-kmod: 0.0.5 [FreeBSD]

Installed packages to be REINSTALLED:
pkg-1.12.0 [FreeBSD] (options changed)

Number of packages to be installed: 1
Number of packages to be reinstalled: 1

The operation will free 25 MiB.
3 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/2] Fetching pkg-1.12.0.txz: 100% 3 MiB 1.8MB/s 00:02
[2/2] Fetching aquantia-atlantic-kmod-0.0.5.txz: 100% 22 KiB 22.9kB/s 00:01
Checking integrity... done (0 conflicting)
[1/2] Reinstalling pkg-1.12.0...
[1/2] Extracting pkg-1.12.0: 100%
[2/2] Installing aquantia-atlantic-kmod-0.0.5...
[2/2] Extracting aquantia-atlantic-kmod-0.0.5: 100%
# kldload /boot/modules/if_atlantic.ko
# vi /boot/loader.conf



Issues:
- both ways (boot conf or your own pre-boot script to kldload) are wiped out after OS update (ok for me as i use 10gbit just between NAS and PC)
- performance is limited by
1) the hardware itself (max 3.5gbit for anyone i got report from) -- using 5gbit QNAP USB3 device at the moment and all tests are single user sequential
2) the driver or operating system, lacks more in single thread speed than other OS with the same hardware and "same" setup:

iperf3 to NAS 1 / 2 / 4 threads : 2.2 2.8 3.4
iperf3 -R 1 / 2 / 4 threads : 2.2 2.8 3.45

3) the freebsd services

samba big files read 390MBs vs 400MBs on debian ZFS (still not bad sequential performance given iperf above and lack of multithreads like in debian)
samba big files write 370MBs vs 400MBs on debian ZFS (again, there are some hiccups, it's never a flat line, without chopiness it'd be pure 3.5gbs)
above could be attributed to driver perhaps, but this sucks:
samba medium files up to 50% slower
samba tiny files up to 100% slower (no matter what, sync=disabled, encryption off etc)
on top of that, NFS is ~100% slower than freebsd samba, ironically, while non-kernel debian NFS was ~100% faster than samba, in other words, 4x faster than freenas NFS. i don't use it as i hate Win10Pro NFS client implementation.
Overall CPU usage is very nice on X3421 Gen10, hardly 50% used with encryption on at around laughable 20 watts.
ARC utilization doesn't really help with reads or writes. Did hundreds of tests, and i do read tests from cache (proven by monitoring) and from disk if needed. The small to medium files (MP3s and JPGs) are a big performance bottleneck, this is i think a limitation of samba. Debian pipelines single user somehow, freebsd only ZFS. No samba tweaks help. Writes rely on drive activity and i'd need 10gbit NIC to check if there's any boost as right now NIC speed <= drive speed. Using all types of drives - new NVME, SSD, and RAIDZ drives. Even direct benchmarks are lower (-50% on NVME dd vs debian). Freebsd needs to catch up to 10gbit era, soon people will upgrade to thunderbolt speeds and then higher. ideally 10gbit will be soon obsoleted like H264 and SATA, so we can build proper NVME-like RAIDs (hopefully non PCI in future), have to count on each client having an NVME drive with 3GBs speed...
 

ianrm

Dabbler
Joined
Aug 22, 2020
Messages
27
Hi folks,
which directory do you add the install file to?
Found the answer in an earlier post in this thread. I now have to wait until I can get a new BIOS battery. Lock down means I rely on click and collect.

Ian
 
Last edited:

ianrm

Dabbler
Joined
Aug 22, 2020
Messages
27
Hi folks,
thank youl to all the people that have contributed to this thread, my 10gb NIC is now working and re-sconnects after a restart. Next challenge is to access the storage which is proving a little troublesome, but I will persevere.
Ian
 

djjaeger82

Dabbler
Joined
Sep 12, 2019
Messages
16
Hi guys, I'm having a hell of a time getting this working. First I tried the pkg install, then i tried compiling myself to use the latest v0.0.5 driver (both gave me the kernel mismatch). So then I tried the if_atlantic.ko posted here (v0.0.4). Got it installed, got the aq0 to show up in ifconfig and in the network interfaces. Configured my IP manually, however I cannot seem to connect to anything on the network. (cannot ping, can't try iperf, etc).

Any ideas where to start? I know this card works because I had it working before in my ESXi box (aka cables are fine, other PC is fine). Only thing I changed was putting it into my FreeNAS machine and trying to get this driver to work...

I'm on FREENAS 11.3_U5 btw...
 

lotustechie

Dabbler
Joined
Jun 3, 2020
Messages
27
I completely forgot about this issue before I upgraded to TrueNAS and I am unable to get the NIC working. Does anyone know if there's a workaround for this? It looks like they are further locking down the CLI.
 

lotustechie

Dabbler
Joined
Jun 3, 2020
Messages
27
I completely forgot about this issue before I upgraded to TrueNAS and I am unable to get the NIC working. Does anyone know if there's a workaround for this? It looks like they are further locking down the CLI.
I'm guessing they messed with the kernel version because I'm getting this message:
KLD if_atlantic.ko: depends on kernel - not available or version mismatch linker_load_file: usr/if_atlantic.ko - unsupported file type
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
They are in no way locking down the CLI.

Neither are they "messing" with the kernel version. TrueNAS simply runs on top of FreeBSD 12.2 at the moment while FreeNAS was 11.3 lately. Of course there is a new kernel version, there wouldn't be all the huge improvements without it.

So to fix your system get FreeBSD 12.2 compatible drivers from your vendor. If there aren't any, don't buy crappy hardware that is not supported by the OS.

Kind regards,
Patrick
 

lotustechie

Dabbler
Joined
Jun 3, 2020
Messages
27
They are in no way locking down the CLI.

Neither are they "messing" with the kernel version. TrueNAS simply runs on top of FreeBSD 12.2 at the moment while FreeNAS was 11.3 lately. Of course there is a new kernel version, there wouldn't be all the huge improvements without it.

So to fix your system get FreeBSD 12.2 compatible drivers from your vendor. If there aren't any, don't buy crappy hardware that is not supported by the OS.

Kind regards,
Patrick
I can definitely tell that you are an old school IT guy because you have absolutely no social skills or empathy whatsoever. Just because you think that the hardware "crappy" doesn't make it gospel. Typically, in my experience, developers don't make random drivers obsolete in new versions. I can't count the number of posts where people like you are condemning others for using the CLI. Apparently, you're not supposed to use it.

The problem is not with the vendors, the problem is with the developer. Do you think that Microsoft became one of the largest technology companies on the planet because the reused to support hardware that is considered common and has a huge market share? No. They either developed the drivers on their own or worked with the company's to make sure that it worked with their operating system(s).

The biggest problem with this brand and its community is people like you. Instead of trying to help people with their technical issues, you become derisive and condescending. That's not what IT is supposed to be about. It supposed to be about making an effort to help people. You can teach technical knowledge, but apparently, you can't teach civility and manners. No one likes a dick.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
If you add a third party driver to a FreeBSD system you must compile the driver for each new kernel version.
So do what you did to get it working on FreeNAS 11.3 again.

I hope this is more helpful.

If this is the correct Git repo, it seems like they do support FreeBSD 11 to 13, so that should be possible.
You will need a FreeBSD 12.2 machine somewhere to compile.

As for "crappy": first I preceded that with an "if". And hardware vendors who don't update their drivers for new OS releases are crap in my opinion. Like the USB serial adapter that goes into the bin when I update my Mac to 64 bit only Catalina. Apple has been telling developers for years they were going to do it and my vendor support downright told me they had no plans to produce a 64 bit driver. Crap. Plain and simple.

If the vendor or their users want the driver included in FreeBSD, someone should file a bug report asking for import with the FreeBSD project. The FreeBSD people don't scan github regularly for arbitrary driver software to include.
 
Last edited:

Seani

Dabbler
Joined
Oct 18, 2016
Messages
41
Am I understanding all this correctly? There used to be a workaround for getting the driver/card to work in freenas 11.3, but now that Truenas Core came around, that workaround no longer works because of a kernel mismatch?
I thought Truenas was supposed to support the card out of the box, which apparently did not happen.
Real shame since I just plugged one into my NAS and one into my workstation (bought them on sale for 73€ each).
Let me know if someone comes up with a new solution.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
It is up to the card vendor to provide a driver compatible with FreeBSD 12.2. It seems like they do, the same workaround as with FreeNAS 11.3 applies. But you need to build the driver binary from source for every new FreeBSD kernel version. That's just how things work.

Best bet is to use a separate FreeBSD 12.2 installation, e.g. in a virtual machine, to build the driver.

Here's a Vagrant box I built that you could use:
 
Top