xcp icon indicating copy to clipboard operation
xcp copied to clipboard

Driver: Add support for intel i225 nic (igc)

Open hoerup opened this issue 3 years ago • 53 comments

Has been asked for at least twice

https://xcp-ng.org/forum/topic/5454/anybody-using-11th-gen-intel-nuc-with-intel-i225-nics https://xcp-ng.org/forum/topic/4998/i225-nic-driver-for-8-2?_=1642613018175

hoerup avatar Jan 19 '22 17:01 hoerup

So the driver would be Intel's igc, it seems.

Where do you find this kind of devices usually?

stormi avatar Jan 25 '22 10:01 stormi

So the driver would be Intel's igc, it seems.

Where do you find this kind of devices usually?

Higher end consumer/workstation motherboards and intel nucs

dziurr avatar Jan 26 '22 09:01 dziurr

I could use this driver as well. My device has this nic

smiggiddy avatar Feb 12 '22 11:02 smiggiddy

I would love integration of this driver. It looks like all future Intel NUCs are going to use NICs that need it. (and I can imagine quite a few home labs are going to start to want to use these energy efficient little beasts with the current rising energy costs)

StreborStrebor avatar Feb 13 '22 14:02 StreborStrebor

We're building a driver and I'm considering including it in the upcoming new installation ISOs for XCP-ng 8.2 (8.2.1 ISOs), but I'll need extremely fast test feedback for that, or I'll just revert before the release due next week.

Any volunteers?

stormi avatar Feb 15 '22 11:02 stormi

I can test

smiggiddy avatar Feb 15 '22 15:02 smiggiddy

Here's a RPM you can install on an already installed XCP-ng: https://koji.xcp-ng.org/kojifiles/packages/igc-module/4.20.17/1.xcpng8.2/x86_64/igc-module-4.20.17-1.xcpng8.2.x86_64.rpm

If you couldn't install XCP-ng at all due to the missing driver, then I'll have to build a new installation ISO with it.

stormi avatar Feb 15 '22 16:02 stormi

unfortunately, I couldn't install cause of the missing driver.

I can unpack that RPM though? Load up the kernel module, and then install the rpm?

smiggiddy avatar Feb 15 '22 16:02 smiggiddy

Yes, this should work.

stormi avatar Feb 15 '22 16:02 stormi

You can access a shell with ALT+RIGHT during installation.

Then insmod igc.ko. This hopefully should be enough to allow you to proceed further.

After the installation, at first reboot, install the RPM.

stormi avatar Feb 15 '22 16:02 stormi

  1. just compiled it from source and it seams to work, needs ifconfig eth0 down and ifconfig eth0 up on every start

dziurr avatar Feb 15 '22 20:02 dziurr

Here's a test installation ISO image. Please test ASAP and tell me if it your network card is operational: https://updates.xcp-ng.org/tmp/xcp-ng-8.2.1-test5.iso

stormi avatar Feb 15 '22 20:02 stormi

i've installed your iso and its kind of working but i need to do ifconfig eth0 down and ifconfig eth0 up every start to make it working.

dziurr avatar Feb 15 '22 21:02 dziurr

i've installed your iso and its kind of working but i need to do ifconfig eth0 down and ifconfig eth0 up every start to make it working.

And not with the one you built from sources? Where did you get the sources from?

stormi avatar Feb 15 '22 23:02 stormi

i've installed your iso and its kind of working but i need to do ifconfig eth0 down and ifconfig eth0 up every start to make it working.

And not with the one you built from sources? Where did you get the sources from?

Same thing happens with driver build from source. Btw dmesg shows igc: loading out of tree driver taints kernel in both versions. Got source's from xcp-ng rpms repo

dziurr avatar Feb 16 '22 06:02 dziurr

The message in dmesg is expected when you load a driver that was not a builtin driver.

stormi avatar Feb 16 '22 11:02 stormi

Can you try to identify why the down+up is necessary?

Could others test the installation ISO, too?

stormi avatar Feb 16 '22 11:02 stormi

it seams like it starts while splash screen is loading(leds turn on) and it goes down after splash screen closes(leds turn of). after down+up it starts working. doing only up won't fix it. tried adding ifcfg-eth0 file to network scripts with ONBOOT=yes and DEVICE=eth0 and it won't load automatically, need to restart network service and it will work.

dziurr avatar Feb 16 '22 15:02 dziurr

Can you try to identify why the down+up is necessary?

Could others test the installation ISO, too?

@stormi I probably found the problem. ethtool does not work with igc.

dziurr avatar Feb 16 '22 18:02 dziurr

Here are the sources we build ethtool from: https://github.com/xcp-ng-rpms/ethtool/tree/8.2

If we can find a patch that fixes this issue, I could be able to integrate it in the 8.2.1 release. I've got a lot of other tasks to do so any help in this direction from you or the rest of the community would be wonderful.

stormi avatar Feb 16 '22 19:02 stormi

Can you try to identify why the down+up is necessary? Could others test the installation ISO, too?

@stormi I probably found the problem. ethtool does not work with igc.

By the way can you detail what leads you to this conclusion?

stormi avatar Feb 17 '22 17:02 stormi

ethtool with every command expect -i shows operation not supported for eth0(i225-v). Just for test booted xcp-ng installer on another pc with realtek r8125 and ethtool works just fine. I am trying to add igc support to ethtool from your repo, but without any luck so far. i added igc code from newer ethtool and updated makefiles etc... it compiled just fine but it still wont work with igc. also tried installing ethtool 5.8 from centos rpms and the same story. For test purpose booted centos 7.2009 installer and ethtool works with igc.

dziurr avatar Feb 17 '22 18:02 dziurr

Thanks. Now I have also feedback for r8125 thanks to you. Is your Realtek card an USB one or PCI-E?

stormi avatar Feb 17 '22 18:02 stormi

For test purpose booted centos 7.2009 installer and ethtool works with igc.

Did CentOS 7.9 recognise the device directly, or did you need to build the driver?

stormi avatar Feb 17 '22 18:02 stormi

By the way can you detail what leads you to this conclusion?

r8125 in PCIe integrated in aorus x570 master motherboard.

dziurr avatar Feb 17 '22 18:02 dziurr

For test purpose booted centos 7.2009 installer and ethtool works with igc.

Did CentOS 7.9 recognise the device directly, or did you need to build the driver?

Surprisingly installer recognized it right away and it has very old kernel 3.10. ethtool also worked

dziurr avatar Feb 17 '22 18:02 dziurr

They probably backported the driver to their kernel.

stormi avatar Feb 17 '22 18:02 stormi

Looking at how they did might reveal something we missed.

stormi avatar Feb 17 '22 18:02 stormi

Looking at how they did might reveal something we missed.

So in conclusion: installed ethtool 4.8 from centos 7.9 and it doesn't work with with igc installed ethtool 5.8 from new centos and the same story I installed centos 8(4.18 kernel igc included ethtool 5.13) and everything works. then i installed ethtool 4.19 from xcp-ng on it which does not have igc support, and surprisingly works, so the problem must be somewhere else maybe igc module. I found that igc sources from centos 4.18 kernel contains more files. I am trying to build igc from centos source.

edit:Comparing source codes of both igc versions reviles the problem. igc module backported to 4.20 does not have anything about ethtool while centos version has a lot of code dedicated to ethtool

dziurr avatar Feb 17 '22 22:02 dziurr

After long investigation i found why it did not work. The problem lied in igc. I have been able to patch the driver and it seams to work. i also noticed that the driver backported to kernel 4.20 does not support ethtool. I found latest version of igc in linux tree with ethtool support i patched it and compiled and it seams to work. i've also added added igc code to ethtool.

dziurr avatar Feb 20 '22 01:02 dziurr