Closed eonghk closed 2 years ago
I personally think that it should just simply work by default and pick safe defaults. If it requires to downgrade kernel, then it should downgrade kernel. I guess one of simplest possible fixes for now is to mask kernels >=5.15 until Amazon will release new ena driver version.
PS: I should really invest some time to automate testing this script every week against live gentoo to timely detect compatibility issues.
Hmm, fails on latest 3.6.1 ena as well, likely will have to blacklist 5.15 kernel
* Process has failed with error code 1: emerge --quiet net-misc/ena
> !!! It seems /run is not mounted. Process management may malfunction.
>
> * IMPORTANT: 13 news items need reading for repository 'gentoo'.
> * Use eselect news read to view new items.
>
> >>> Verifying ebuild manifests
> >>> Emerging (1 of 2) virtual/linux-sources-3-r6::gentoo
> >>> Installing (1 of 2) virtual/linux-sources-3-r6::gentoo
> >>> Emerging (2 of 2) net-misc/ena-2.6.1::local
> >>> Failed to emerge net-misc/ena-2.6.1, Log file:
> >>> '/var/tmp/portage/net-misc/ena-2.6.1/temp/build.log'
> * Package: net-misc/ena-2.6.1
> * Repository: local
> * USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
> * FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox
> * Determining the location of the kernel source code
> * Found kernel source directory:
> * /usr/src/linux
> * Found sources for kernel version:
> * 5.15.23-gentoo-x86_64
> * Checking for suitable kernel configuration options...
> [ ok ]
> ln: failed to create symbolic link 'Module.symvers': File exists
> * Preparing ena module
> make -C /usr/src/linux M=/var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena modules
> make[1]: Entering directory '/usr/src/linux-5.15.23-gentoo'
> CC [M] /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena/ena_netdev.o
> CC [M] /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena/ena_ethtool.o
> CC [M] /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena/ena_lpc.o
> CC [M] /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena/dim.o
> CC [M] /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena/net_dim.o
> CC [M] /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena/../common/ena_com//ena_com.o
> CC [M] /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena/../common/ena_com//ena_eth_com.o
> CC [M] /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena/ena_sysfs.o
> /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena/ena_ethtool.c:1072:35: error: initialization of ‘int (*)(struct net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)’ from incompatible pointer type ‘int (*)(struct net_device *, struct ethtool_coalesce *)’ [-Werror=incompatible-pointer-types]
> 1072 | .get_coalesce = ena_get_coalesce,
> | ^~~~~~~~~~~~~~~~
> compilation terminated due to -Wfatal-errors.
> cc1: some warnings being treated as errors
> make[2]: *** [scripts/Makefile.build:277: /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena/ena_ethtool.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [Makefile:1868: /var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena] Error 2
> make[1]: Leaving directory '/usr/src/linux-5.15.23-gentoo'
> make: *** [Makefile:41: all] Error 2
> * ERROR: net-misc/ena-2.6.1::local failed (compile phase):
> * emake failed
> *
> * If you need support, post the output of `emerge --info '=net-misc/ena-2.6.1::local'`,
> * the complete build log and the output of `emerge -pqv '=net-misc/ena-2.6.1::local'`.
> * The complete build log is located at '/var/tmp/portage/net-misc/ena-2.6.1/temp/build.log'.
> * The ebuild environment file is located at '/var/tmp/portage/net-misc/ena-2.6.1/temp/environment'.
> * Working directory: '/var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena'
> * S: '/var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena'
> * Messages for package net-misc/ena-2.6.1:
> * ERROR: net-misc/ena-2.6.1::local failed (compile phase):
> * emake failed
> *
> * If you need support, post the output of `emerge --info '=net-misc/ena-2.6.1::local'`,
> * the complete build log and the output of `emerge -pqv '=net-misc/ena-2.6.1::local'`.
> * The complete build log is located at '/var/tmp/portage/net-misc/ena-2.6.1/temp/build.log'.
> * The ebuild environment file is located at '/var/tmp/portage/net-misc/ena-2.6.1/temp/environment'.
> * Working directory: '/var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena'
> * S: '/var/tmp/portage/net-misc/ena-2.6.1/work/amzn-drivers-ena_linux_2.6.1/kernel/linux/ena'
>
>
>
> * IMPORTANT: 13 news items need reading for repository 'gentoo'.
> * Use eselect news read to view new items.
>
Alright, fixed in 1.1.6 by blacklisting kernels >=15.15
With the latest stable 5.15.11 kernel, the ena driver doesn't compile. It works fine with 5.10.x version.
Maybe a kernel option will benefit?