OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: Ricardo on November 08, 2020, 10:41:25 am

Title: Query Intel igb NIC driver version
Post by: Ricardo on November 08, 2020, 10:41:25 am
This one seems no longer possible:
https://forum.opnsense.org/index.php?topic=9354.0

# sysctl -a | grep -E 'dev.(igb|ix|em).*.%desc

It no longer returns driver version, only the generic string:
"Intel(R) PRO/1000 Network Connection"
Title: Re: Query Intel igb NIC driver version
Post by: miroco on November 08, 2020, 08:33:35 pm
This from my APU2C4; I think you just missed the two last characters of the string whilst copying it.

root@opnsense:~ # sysctl -a | grep -E 'dev.(igb|ix|em).*.%desc:'
dev.igb.2.%desc: Intel(R) PRO/1000 PCI-Express Network Driver
dev.igb.1.%desc: Intel(R) PRO/1000 PCI-Express Network Driver
dev.igb.0.%desc: Intel(R) PRO/1000 PCI-Express Network Driver
Title: Re: Query Intel igb NIC driver version
Post by: Alphabet Soup on November 09, 2020, 12:47:12 am
I think the info you're after is now in the 'iflib.driver_version' component instead of '%desc'.

# sysctl -a | grep -E 'dev.(igb|ix|em).*.iflib.driver_version:'
dev.igb.1.iflib.driver_version: 7.6.1-k
dev.igb.0.iflib.driver_version: 7.6.1-k
Title: Re: Query Intel igb NIC driver version
Post by: Ricardo on November 09, 2020, 10:44:26 am
This from my APU2C4; I think you just missed the two last characters of the string whilst copying it.

root@opnsense:~ # sysctl -a | grep -E 'dev.(igb|ix|em).*.%desc:'
dev.igb.2.%desc: Intel(R) PRO/1000 PCI-Express Network Driver
dev.igb.1.%desc: Intel(R) PRO/1000 PCI-Express Network Driver
dev.igb.0.%desc: Intel(R) PRO/1000 PCI-Express Network Driver

So can you tell me what version YOUR igb driver is? ;)
Title: Re: Query Intel igb NIC driver version
Post by: Ricardo on November 09, 2020, 10:48:16 am
I think the info you're after is now in the 'iflib.driver_version' component instead of '%desc'.

# sysctl -a | grep -E 'dev.(igb|ix|em).*.iflib.driver_version:'
dev.igb.1.iflib.driver_version: 7.6.1-k
dev.igb.0.iflib.driver_version: 7.6.1-k

I dont think iflib driver version has anything to do with the igb driver version, but if you can point to me to an authentic proof, I can be convinced. Because the official Intel Freebsd igb driver says v2.5.16

https://downloadcenter.intel.com/download/15815/Intel-Network-Adapter-Driver-for-82575-6-and-82580-based-Gigabit-Network-Connections-under-FreeBSD-

igb-2.5.16.tar.gz

FreeBSD* Driver for Intel(R) Ethernet
=====================================

August 7, 2019
Title: Re: Query Intel igb NIC driver version
Post by: madj42 on November 09, 2020, 09:11:06 pm
You'll also find this here:

https://downloadcenter.intel.com/download/17509/Intel-Network-Adapter-Gigabit-Base-Driver-for-FreeBSD-?wapkw=i350

I'm not sure the differences between the 2.5.x and the 7.x versions.  Posting this only as this driver seems to be in line with what is already there.
Title: Re: Query Intel igb NIC driver version
Post by: Alphabet Soup on November 10, 2020, 01:09:18 am
I believe the iflib.driver_version is returning the same value formerly appended to the %desc value.

https://www.freebsd.org/cgi/man.cgi?query=iflib&manpath=FreeBSD+12.2-RELEASE (https://www.freebsd.org/cgi/man.cgi?query=iflib&manpath=FreeBSD+12.2-RELEASE)
The Description paragraph of the iflib man page explains how its purpose is to allow driver authors to use a standard set of sysctl names, and defines driver_version as "A string indicating the internal version of the driver."  I take "the driver" to mean "the driver you wrote to operate the hardware" not "the iflib framework".

https://www.freebsd.org/cgi/man.cgi?query=em&sektion=4&manpath=FreeBSD+12.2-RELEASE (https://www.freebsd.org/cgi/man.cgi?query=em&sektion=4&manpath=FreeBSD+12.2-RELEASE)
The value returned by my i350 dual-port NIC is in line with what madj42 linked to.  The History paragraph of the em man page explains how "em was merged with the igb device driver and converted to the iflib framework in FreeBSD 12.0."  Which would explain why the unused Intel igb driver version does not match the one from the kernel reported via iflib.driver_version.
Title: Re: Query Intel igb NIC driver version
Post by: Ricardo on November 11, 2020, 10:35:06 pm
You may be right. 12.x brought too many differences over the previous 11.x, and the docimentations and previous tricks and tips will take ages to be updated or replaced with short-living actual solutions. At least until 13.0 arrives, when everything will be broken again.