Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Intel I225/I226 driver (igc) #1786

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

mrIncompetent
Copy link
Contributor

@mrIncompetent mrIncompetent commented Mar 22, 2024

Enable Intel I225/I226 driver (igc)

This adds the Intel IGC driver for 2.5G NICs (I225/I226).

Right now, booting Flatcar fails during initramfs as the ignition config cannot be loaded. Root cause is the missing driver for the NIC.

Fedora CoreOS works and comes with those drivers as well:

core@localhost:~$ cat /etc/os-release | grep PRETTY_NAME
PRETTY_NAME="Fedora CoreOS 39.20240225.3.0"
core@localhost:~$ lsmod | grep igc
igc                   192512  0

Intel documentation: https://www.intel.com/content/www/us/en/support/articles/000055236/ethernet-products/gigabit-ethernet-controllers-up-to-2-5gbe.html

Would much appreciate, so this stack of NUC-like devices becomes useful:
IMG_7204

@pothos
Copy link
Member

pothos commented Mar 25, 2024

Thank you, looks good!
I've started an image build and if you want, you can download the image artifact amd64-generic-image.zip and test if everything works.
We'll also have to check the vmlinuz size increase to make sure that the boot partition is less than half filled (once the image is built, I can download it and do the check).

Copy link

github-actions bot commented Mar 25, 2024

@@ -70,6 +70,7 @@ CONFIG_ISCSI_IBFT=y
CONFIG_ISCSI_IBFT_FIND=y
CONFIG_ITCO_VENDOR_SUPPORT=y
CONFIG_ITCO_WDT=m
CONFIG_IGC=m
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that this driver might be also useful for ARM64. But from the docs, this driver seems to be used mostly on the NUCs and not the ARM64 servers (ARM64 boards do not use Intel as well).

@mrIncompetent
Copy link
Contributor Author

I've started an image build and if you want, you can download the image artifact amd64-generic-image.zip and test if everything works.

Found the correct images in amd64-vm-images.zip & verified it works:

Flatcar Container Linux by Kinvolk developer 3916.0.0+nightly-20240321-2100-2-gc64bd7462c
Update Strategy: No Reboots
core@localhost ~ $ lsmod | grep igc
igc                   188416  0
core@localhost ~ $ networkctl 
IDX LINK   TYPE     OPERATIONAL SETUP     
  1 lo     loopback carrier     configured
  2 enp3s0 ether    routable    configured

2 links listed.
core@localhost ~ $ networkctl status enp3s0
● 2: enp3s0
                   Link File: /usr/lib/systemd/network/99-default.link
                Network File: /usr/lib/systemd/network/yy-pxe.network
                       State: routable (configured)
                Online state: online                                             
                        Type: ether
                        Path: pci-0000:03:00.0
                      Driver: igc
                      Vendor: Intel Corporation
                       Model: Ethernet Controller I226-V
            Hardware Address: e0:51:d8:12:bf:59 (China Dragon Technology Limited)
                         MTU: 1500 (min: 68, max: 9216)
                       QDisc: mq
IPv6 Address Generation Mode: eui64
    Number of Queues (Tx/Rx): 4/4
            Auto negotiation: yes
                       Speed: 2Gbps
                      Duplex: full
                        Port: tp
                     Address: 192.168.2.31 (DHCP4 via 192.168.2.1)
                              fd0d:c0e4:bc17:fce1:e251:d8ff:fe12:bf59
                              fe80::e251:d8ff:fe12:bf59
                     Gateway: 192.168.2.1
                         DNS: 192.168.2.1
           Activation Policy: up
         Required For Online: yes
             DHCP4 Client ID: e0:51:d8:12:bf:59
           DHCP6 Client DUID: DUID-EN/Vendor:0000ab113e86281fd8ebac8e
                Connected To: MikroTik on port bridge/ether6

@ader1990
Copy link
Contributor

The module size should be around 100k. Would be helpful to know the size of it and the size of the boot partition used space.

modinfo igc | grep -i filename | awk '{print $2}' | xargs ls -liat
du -s /boot

@mrIncompetent
Copy link
Contributor Author

Flatcar Container Linux by Kinvolk developer 3916.0.0+nightly-20240321-2100-2-gc64bd7462c
Update Strategy: No Reboots
core@localhost ~ $ modinfo igc | grep -i filename | awk '{print $2}' | xargs ls -liat
du -s /boot
5073 -rw-r--r--. 1 root root 78716 Mar 25 07:50 /lib/modules/6.6.21-flatcar/kernel/drivers/net/ethernet/intel/igc/igc.ko.xz
0	/boot

@mrIncompetent
Copy link
Contributor Author

No boot partition as it's live booted via pxe.
I'll try to install

@mrIncompetent
Copy link
Contributor Author

mrIncompetent commented Mar 25, 2024

Did an install via:

sudo flatcar-install -d /dev/nvme0n1 -f ./flatcar_production_image.bin -i ./ignition.json

./flatcar_production_image.bin being the image taken from amd64-generic-image.zip/flatcar_production_image.bin.bz2

ignition.json being:

{"ignition":{"config":{"replace":{"verification":{}}},"proxy":{},"security":{"tls":{}},"timeouts":{},"version":"3.4.0"},"kernelArguments":{},"passwd":{"users":[{"name":"core","sshAuthorizedKeys":["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICjTyrFjJwY/e/6rV2RUx6hlxNw3kmctVw0otkjw0771 henrik@framework13"]}]},"storage":{},"systemd":{}}
Flatcar Container Linux by Kinvolk developer 3916.0.0+nightly-20240321-2100-2-gc64bd7462c
core@localhost ~ $ modinfo igc | grep -i filename | awk '{print $2}' | xargs ls -liat
du -s /boot
17758 -rw-r--r--. 1 root root 78716 Mar 25 07:50 /lib/modules/6.6.21-flatcar/kernel/drivers/net/ethernet/intel/igc/igc.ko.xz
62596	/boot

@ader1990
Copy link
Contributor

62596

This looks in line with the ~70k compressed kernel module versus the latest version size. #1731 (comment)

This adds the Intel IGC driver for 2.5G NICs (I225/I226).

Fedora CoreOS comes with those drivers as well:
```
core@localhost:~$ cat /etc/os-release | grep PRETTY_NAME
PRETTY_NAME="Fedora CoreOS 39.20240225.3.0"
core@localhost:~$ lsmod | grep igc
igc                   192512  0
```
@pothos pothos merged commit f0472bf into flatcar:main Mar 25, 2024
1 check failed
@mrIncompetent mrIncompetent deleted the enable-intel-2.5g branch March 25, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
4 participants