(still a noob on OpnSense & FreeBSD)
In trying to play around with system tunables, I had a question.
OS: FreeBSD 13.0
OPNSense: 22.7.7_1-amd64
HW: Protecli VP2410
Processor: Intel(R) Celeron(R) J4125 CPU @ 2.00GHz
It has 4 1G ports by Intel NIC.
dmesg | grep -t Intel
shows
igb0: <Intel(R) I211 (Copper)> port 0x1000-0x101f mem 0x91100000-0x9111ffff,0x91120000-0x91123fff at device 0.0 on pci1
igb1: <Intel(R) I211 (Copper)> port 0x2000-0x201f mem 0x91200000-0x9121ffff,0x91220000-0x91223fff at device 0.0 on pci2
igb2: <Intel(R) I211 (Copper)> port 0x3000-0x301f mem 0x91300000-0x9131ffff,0x91320000-0x91323fff at device 0.0 on pci3
igb3: <Intel(R) I211 (Copper)> port 0x4000-0x401f mem 0x91400000-0x9141ffff,0x91420000-0x91423fff at device 0.0 on pci6
Interface names are igbX where X = 0,1,2,3
But when I try to tune a corresponding value e.g. hw.igb.rx_process_limits it shows as unsupported.
So upon checking sysctl hw
following is seen
hw.igc.max_interrupt_rate: 8000
hw.igc.eee_setting: 1
hw.igc.rx_process_limit: 100
hw.igc.sbp: 1
hw.igc.smart_pwr_down: 0
hw.igc.rx_abs_int_delay: 66
hw.igc.tx_abs_int_delay: 66
hw.igc.rx_int_delay: 0
hw.igc.tx_int_delay: 66
hw.igc.disable_crc_stripping: 0
A bit more reading indicates igb as being different to igc. If HW is Intel i211, then per latest release notes( https://downloadmirror.intel.com/757201/Release_Notes_27.7.pdf (https://downloadmirror.intel.com/757201/Release_Notes_27.7.pdf) ) mention driver as being igb (page 11).
But then shouldn't systcl have hw.igb as parameters one could tune?
That has historical reasons. sysctl hw.igc does NOT refer to I211 cards, but to I225/I226 variants, which are named igcX.
I211 originally was supported by the "em" driver, which was then converted to iflib framework. Therefore, those variants are now referred to by igbX, but the sysctl variables are still under hw.em, not hw.igb.
See: https://www.freebsd.org/cgi/man.cgi?query=igb and https://www.freebsd.org/cgi/man.cgi?query=igc
Thank you, this was very helpful!
Oddly enough, the intel driver version is not displayed in dmesg. I checked a few posts on OPNSense and FreeBSD forums as well. For most of those, some version of the driver is displayed; albeit the posts had either an older version of FreeBSD (10-12) or older version of OPNSense (pre-22). I'd be curious to get your perspective on whether you and/or others have observed a similar thing for intel drivers in latest OPNSense.
I'll tune using hw.em :-)
I can see only this in current OpnSense 27.7.7_1:
igb0: <Intel(R) I210 Flashless (Copper)> port 0x3000-0x301f mem 0xd0800000-0xd081ffff,0xd0820000-0xd0823fff at device 0.0 on pci2
igb0: NVM V0.6 imgtype6
igb0: Using 1024 TX descriptors and 1024 RX descriptors
igb0: Using 4 RX queues 4 TX queues
igb0: Using MSI-X interrupts with 5 vectors
igb0: Ethernet address: f4:90:ea:xx:xx:xx
igb0: netmap queues/slots: TX 4/1024, RX 4/1024