Aquantia / AQtion

Aquantia AQC multigigabit NIC linux driver (atlantic) - development preview
https://www.aquantia.com
82 stars 28 forks source link

net-misc/AQtion-2.5.5: too many arguments to function ‘netif_napi_add' #44

Open HougeLangley opened 1 year ago

HougeLangley commented 1 year ago

Full build log

 * Package:    net-misc/AQtion-2.5.5:0
 * Repository: hougeapps-overlay
 * Maintainer: chutzpah@gentoo.org
 * 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:
 *     6.1.1-lqx3
 * Checking for suitable kernel configuration options ...
 *   CONFIG_AQTION:  should not be set. But it is.
 [ !! ]
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
>>> Unpacking source...
>>> Unpacking AQtion-2.5.5.tar.gz to /var/tmp/portage/net-misc/AQtion-2.5.5/work
>>> Source unpacked in /var/tmp/portage/net-misc/AQtion-2.5.5/work
>>> Preparing source in /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45 ...
ln: failed to create symbolic link 'Module.symvers': File exists
 * Preparing atlantic module
make -j48 HOSTCC=x86_64-pc-linux-gnu-gcc 'LDFLAGS=-m elf_x86_64' all 
make -j4 -C /usr/src/linux M="/var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45" modules
make[1]: Entering directory '/usr/src/linux-6.1.1-liquorix-r1'
make[1]: warning: -j4 forced in submake: resetting jobserver mode.
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Gentoo 12.2.1_p20221224 p7) 12.2.1 20221224
  You are using:           x86_64-pc-linux-gnu-gcc (Gentoo 12.2.1_p20221224 p7) 12.2.1 20221224
  CC [M]  /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45/aq_main.o
  CC [M]  /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45/aq_nic.o
  CC [M]  /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45/aq_pci_func.o
  CC [M]  /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45/aq_vec.o
/var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45/aq_vec.c: In function ‘aq_vec_alloc’:
/var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45/aq_vec.c:126:9: error: too many arguments to function ‘netif_napi_add’
  126 |         netif_napi_add(aq_nic_get_ndev(aq_nic), &self->napi,
      |         ^~~~~~~~~~~~~~
In file included from ./include/linux/etherdevice.h:21,
                 from /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45/aq_common.h:14,
                 from /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45/aq_vec.h:15,
                 from /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45/aq_vec.c:12:
./include/linux/netdevice.h:2562:1: note: declared here
 2562 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:250: /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45/aq_vec.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1990: /var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45] Error 2
make[1]: Leaving directory '/usr/src/linux-6.1.1-liquorix-r1'
make: *** [Makefile:36: all] Error 2
 * ERROR: net-misc/AQtion-2.5.5::hougeapps-overlay failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=net-misc/AQtion-2.5.5::hougeapps-overlay'`,
 * the complete build log and the output of `emerge -pqv '=net-misc/AQtion-2.5.5::hougeapps-overlay'`.
 * The complete build log is located at '/var/tmp/portage/net-misc/AQtion-2.5.5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-misc/AQtion-2.5.5/temp/environment'.
 * Working directory: '/var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45'
 * S: '/var/tmp/portage/net-misc/AQtion-2.5.5/work/AQtion-340d608726cbfa04b6046d74a362e788e1e17d45'
HougeLangley commented 1 year ago

Gentoo emerge --info

Portage 3.0.43 (python 3.10.9-final-0, default/linux/amd64/17.1/desktop/systemd/merged-usr, gcc-12, glibc-2.36-r6, 6.1.1-lqx3 x86_64)
=================================================================
System uname: Linux-6.1.1-lqx3-x86_64-Intel-R-_Xeon-R-_CPU_E5-2696_v2_@_2.50GHz-with-glibc2.36
KiB Mem:    32086576 total,  30840992 free
KiB Swap:    9435132 total,   9435132 free
Head commit of repository gentoo: 88858ec6d2420300a0b71a2552c8182df626d182

Head commit of repository 4nykey: d95d6671a3ec372528f19047aaf52fb47f22fa2d

Head commit of repository gentoo-zh: d9c711059e8df9d5d532304764c8cdbda3013369

Timestamp of repository guru: Sat, 07 Jan 2023 15:02:41 +0000
Head commit of repository guru: 0e6d612c5455742ef0b612d883b21383873c0d99

Head commit of repository hougeapps-overlay: ecd40aa81864d73285f1b666e6f438057af4d320

sh bash 5.2_p15
ld GNU ld (Gentoo 2.39 p5) 2.39.0
ccache version 4.7.4 [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.2_p15::gentoo
dev-lang/perl:             5.36.0-r1::gentoo
dev-lang/python:           3.10.9::gentoo, 3.11.1::gentoo
dev-lang/rust:             1.66.0::gentoo
dev-util/ccache:           4.7.4::gentoo
dev-util/cmake:            3.25.1::gentoo
dev-util/meson:            1.0.0::gentoo
sys-apps/baselayout:       2.9::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          252.4::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             12.2.1_p20221224::gentoo
sys-devel/gcc-config:      2.9::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/llvm:            15.0.6::gentoo
sys-devel/make:            4.4::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo.git
    priority: -1000
    volatile: True

4nykey
    location: /var/db/repos/4nykey
    sync-type: git
    sync-uri: https://github.com/4nykey/4nykey.git
    masters: gentoo
    volatile: True

gentoo-zh
    location: /var/db/repos/gentoo-zh
    sync-type: git
    sync-uri: https://github.com/microcai/gentoo-zh.git
    masters: gentoo
    volatile: True

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: True

hougeapps-overlay
    location: /var/db/repos/hougeapps-overlay
    sync-type: git
    sync-uri: https://github.com/HougeLangley/hougeapps-overlay.git
    masters: gentoo
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y --autounmask-write=y --quiet-build=n --jobs=4 -l"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles getbinpkg ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://mirrors.ustc.edu.cn/gentoo/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en_US zh_CN en zh"
MAKEOPTS="-j48"
PKGDIR="/var/cache/binpkgs"
PORTAGE_BINHOST="http://hougearch.litterhougelangley.club/gentoo/amd64/desktop/systemd/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/fish"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt5 readline sdl seccomp sound spell ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US zh-CN en zh" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="qxl virgl" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
benedikt-bartscher commented 1 year ago

same here on arch linux

qwrty-ftw commented 1 year ago

Same on Debian 11

DKMS make.log for atlantic-2.5.5.0 for kernel 6.1.6 (x86_64) lun. 16 janv. 2023 15:27:37 CET make : on entre dans le répertoire « /usr/src/linux-headers-6.1.6 » CC [M] /var/lib/dkms/atlantic/2.5.5.0/build/aq_main.o CC [M] /var/lib/dkms/atlantic/2.5.5.0/build/aq_nic.o CC [M] /var/lib/dkms/atlantic/2.5.5.0/build/aq_pci_func.o CC [M] /var/lib/dkms/atlantic/2.5.5.0/build/aq_vec.o CC [M] /var/lib/dkms/atlantic/2.5.5.0/build/aq_ring.o CC [M] /var/lib/dkms/atlantic/2.5.5.0/build/aq_ptp.o CC [M] /var/lib/dkms/atlantic/2.5.5.0/build/aq_filters.o CC [M] /var/lib/dkms/atlantic/2.5.5.0/build/aq_hw_utils.o /var/lib/dkms/atlantic/2.5.5.0/build/aq_ptp.c: In function ‘aq_ptp_init’: /var/lib/dkms/atlantic/2.5.5.0/build/aq_ptp.c:2130:2: error: too many arguments to function ‘netif_napi_add’ 2130 | netif_napi_add(aq_nic_get_ndev(aq_nic), &aq_ptp->napi, | ^~~~~~ In file included from ./include/linux/etherdevice.h:21, from /var/lib/dkms/atlantic/2.5.5.0/build/aq_common.h:14, from /var/lib/dkms/atlantic/2.5.5.0/build/aq_hw_utils.h:15, from /var/lib/dkms/atlantic/2.5.5.0/build/aq_ptp.c:19: ./include/linux/netdevice.h:2569:1: note: declared here 2569 | netif_napi_add(struct net_device dev, struct napi_struct napi, | ^~~~~~ make[1]: [scripts/Makefile.build:250 : /var/lib/dkms/atlantic/2.5.5.0/build/aq_ptp.o] Erreur 1 make[1]: Attente des tâches non terminées.... /var/lib/dkms/atlantic/2.5.5.0/build/aq_vec.c: In function ‘aq_vec_alloc’: /var/lib/dkms/atlantic/2.5.5.0/build/aq_vec.c:126:2: error: too many arguments to function ‘netif_napi_add’ 126 | netif_napi_add(aq_nic_get_ndev(aq_nic), &self->napi, | ^~~~~~ In file included from ./include/linux/etherdevice.h:21, from /var/lib/dkms/atlantic/2.5.5.0/build/aq_common.h:14, from /var/lib/dkms/atlantic/2.5.5.0/build/aq_vec.h:15, from /var/lib/dkms/atlantic/2.5.5.0/build/aq_vec.c:12: ./include/linux/netdevice.h:2569:1: note: declared here 2569 | netif_napi_add(struct net_device dev, struct napi_struct napi, | ^~~~~~ make[1]: [scripts/Makefile.build:250 : /var/lib/dkms/atlantic/2.5.5.0/build/aq_vec.o] Erreur 1 make: [Makefile:1992 : /var/lib/dkms/atlantic/2.5.5.0/build] Erreur 2 make : on quitte le répertoire « /usr/src/linux-headers-6.1.6 »

Should be fix the same way as Octeon driver ?

https://github.com/torvalds/linux/commit/899b8cd0d3922f57176f5a7f552ce93d8a5cd90b

I guess, yes => https://github.com/torvalds/linux/commit/b48b89f9c189d24eb5e2b4a0ac067da5a24ee86d#diff-3900aacc8a16ceb4c46b358fd64df5951289a8c2ead2a1fc05c77df4d90f8916

nixxholas commented 7 months ago

Doesn't seem to fix the build issue after applying a patch manually to test https://github.com/Aquantia/AQtion/pull/48 out.

PS: Also attempted it on 6.2.

make -j4 -C /lib/modules/6.2.0-36-generic/build M="/home/x/LinuxDriver/AQtion" modules
make[1]: Entering directory '/usr/src/linux-headers-6.2.0-36-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  You are using:           gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  CC [M]  /home/x/LinuxDriver/AQtion/aq_main.o
  CC [M]  /home/x/LinuxDriver/AQtion/aq_nic.o
  CC [M]  /home/x/LinuxDriver/AQtion/aq_pci_func.o
  CC [M]  /home/x/LinuxDriver/AQtion/aq_vec.o
  CC [M]  /home/x/LinuxDriver/AQtion/aq_ring.o
  CC [M]  /home/x/LinuxDriver/AQtion/aq_ptp.o
  CC [M]  /home/x/LinuxDriver/AQtion/aq_filters.o
/home/x/LinuxDriver/AQtion/aq_ptp.c: In function ‘aq_ptp_init’:
/home/x/LinuxDriver/AQtion/aq_ptp.c:2130:9: error: too many arguments to function ‘netif_napi_add’
 2130 |         netif_napi_add(aq_nic_get_ndev(aq_nic), &aq_ptp->napi,
      |         ^~~~~~~~~~~~~~
In file included from ./include/linux/etherdevice.h:21,
                 from /home/x/LinuxDriver/AQtion/aq_common.h:14,
                 from /home/x/LinuxDriver/AQtion/aq_hw_utils.h:15,
                 from /home/x/LinuxDriver/AQtion/aq_ptp.c:19:
./include/linux/netdevice.h:2592:1: note: declared here
 2592 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:260: /home/x/LinuxDriver/AQtion/aq_ptp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:2026: /home/x/LinuxDriver/AQtion] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.2.0-36-generic'
make: *** [Makefile:36: all] Error 2
NickR23 commented 6 months ago

Was able to fix this on Debian kernel ver 6.1.0-16.

Had to remove all instances of OCTEON_MGMT_NAPI_WEIGHT from netif_napi_add (it appears in multiple files try make to find all of them) and remove all instances of ctx->prepare netif_napi_add.