freebsd-src icon indicating copy to clipboard operation
freebsd-src copied to clipboard

e1000: Sync DPDK ich8lan

Open kev009 opened this issue 4 years ago • 11 comments

This contains a probable regression for suspend/resume and other issues on I219, break it out so users can help test.

Also of note, I left out two changes to the FreeBSD driver to try and opportunistically use ULP https://cgit.freebsd.org/src/diff/sys/dev/e1000/if_em.c?id=a4378873e9ce1b35b55378c21f8eae69e58c2525

@ricera

kev009 avatar Sep 17 '21 21:09 kev009

@ricera is there any way to get guidance from intel on this file? The datasheets for the client parts are not very enlightening and it's hard to tell whether FreeBSD or OOT or DPDK is authoritative WRT clients.

kev009 avatar Sep 22 '21 18:09 kev009

@ricera is there any way to get guidance from intel on this file? The datasheets for the client parts are not very enlightening and it's hard to tell whether FreeBSD or OOT or DPDK is authoritative WRT clients.

Basically not from within because of its age; but have you looked for the "software developers manuals" instead for those parts? In the past, that contained the stuff that was interesting to drivers, and that stuff wasn't included in the datasheets. Here's one for some old parts, but I don't know exactly what's in ich8lan: https://www.intel.com/content/dam/www/public/us/en/documents/manuals/pcie-gbe-controllers-open-source-manual.pdf

ricera avatar Sep 22 '21 20:09 ricera

For ICH8/9/10, it looks like you'd need "Intel® ICH 8/9/10 and 82566/82567/82562V: Developers Manual", but I can't get a link to it atm

ricera avatar Sep 22 '21 20:09 ricera

For ICH8/9/10, it looks like you'd need "Intel® ICH 8/9/10 and 82566/82567/82562V: Developers Manual", but I can't get a link to it atm

The problem in particular is with I218/I219 ULP there isn't really documentation on this stuff. I can't tell if the FreeBSD or DPDK code is newer in e1000_enable_ulp_lpt_lp().

kev009 avatar Sep 22 '21 20:09 kev009

For ICH8/9/10, it looks like you'd need "Intel® ICH 8/9/10 and 82566/82567/82562V: Developers Manual", but I can't get a link to it atm

The problem in particular is with I218/I219 ULP there isn't really documentation on this stuff. I can't tell if the FreeBSD or DPDK code is newer in e1000_enable_ulp_lpt_lp().

I would assume the DPDK version is newer, and I also think we might have excluded ULP stuff in the FreeBSD driver.

ricera avatar Sep 22 '21 20:09 ricera

I was able to find it on archive.org http://web.archive.org/web/20170226164709/https://www.intel.com/content/dam/doc/manual/i-o-controller-hub-8-9-10-82566-82567-82562v-software-dev-manual.pdf

This will be useful but doesn't seem to cover the LPT+ chipsets.

kev009 avatar Sep 22 '21 20:09 kev009

Ok, I compared the freebsd in-kernel version with the DPDK and internal versions of the file, and it definitely looks like the DPDK version matches the internal one more closely; it's probably the more definitive file to use.

As for I219-ish documentation, that might be when Intel stopped publishing external software documentation for them, I dunno. I have an internal one, but I haven't found any external-facing one yet.

ricera avatar Sep 22 '21 20:09 ricera

I've got this working on I219 now with https://reviews.freebsd.org/D32087 (!)

kev009 avatar Sep 23 '21 21:09 kev009

@ricera I feel like I still don't have enough information to make any decisions on the majority of the changes

In particular, this changeset results in:

  • a hardware initialization failure message when booting I219 (2) without a cable/link (seems otherwise benign)
  • When AMT is enabled on the system firmware, the link flaps regularly. This does not happen without this changeset.

The LSC to CSC change is interesting, Linux and any intel.com Linux and BSD drivers seem to not carry it.

kev009 avatar Sep 27 '21 19:09 kev009

Tempted to close this based on my own and additional user testing, the code in main empirically works better. @ricera I am attempting to get "privileged access" with Intel, hopefully that will allow me to learn the details of I21x ULP

kev009 avatar Sep 29 '21 17:09 kev009

After much trial and error the link flaps appear to be related to a particular old cable. Will need to trace through the shared code to see what is causing the hw init failure message.

kev009 avatar Oct 02 '21 16:10 kev009

This branch looks like it may no longer be relevant. Is it still active? Or can it be closed?

bsdimp avatar Feb 04 '23 18:02 bsdimp

Committed relevant parts as d36fbdb08ff5

kev009 avatar Feb 09 '23 00:02 kev009