Bug 264809 - net/intel-ixl-kmod: Driver is broken with netmap and FreeBSD-13.1
Summary: net/intel-ixl-kmod: Driver is broken with netmap and FreeBSD-13.1
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Intel FreeBSD
URL:
Keywords: IntelNetworking
Depends on:
Blocks:
 
Reported: 2022-06-21 16:13 UTC by Santiago Martinez
Modified: 2023-08-22 21:05 UTC (History)
3 users (show)

See Also:
lwhsu: maintainer-feedback? (freebsd)


Attachments
This is the crash when the intel-ixl-kmod ( with netmap option in auto) is loaded and the port comes up. (284.71 KB, image/png)
2022-06-23 18:36 UTC, Santiago Martinez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Santiago Martinez 2022-06-21 16:13:24 UTC
When using FreeBSD-13.1 with the Intel port the following behaviours is overserved.

When compiling the drivers (from ports), it provides three options related to netmap, auto/on/off.

1 - When compiling the driver with netmap off the problem disappears.

2 - When compiling the driver with netmap auto the driver compiles but triggers the trap when booted and the interface is activated.

3 - When compiling the driver with netmap on, the driver fails to compile, which probably explains the aforementioned behaviour. The issue is related to netmap include files not found.

Disabling the NETMAP support in the drivers seems to fix the issue.
Comment 1 Santiago Martinez 2022-06-23 18:32:44 UTC
This is the error when trying to compile with netmap on.

ixl_txrx.c:70:10: fatal error: 'dev/netmap/if_ixl_netmap.h' file not found
#include <dev/netmap/if_ixl_netmap.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- if_ixl.o ---
if_ixl.c:291:10: fatal error: 'dev/netmap/if_ixl_netmap.h' file not found
#include <dev/netmap/if_ixl_netmap.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- ixl_txrx.o ---
1 error generated.
*** [ixl_txrx.o] Error code 1

make[2]: stopped in /usr/ports/net/intel-ixl-kmod/work/ixl-1.12.2/src
--- if_ixl.o ---
1 error generated.
*** [if_ixl.o] Error code 1

make[2]: stopped in /usr/ports/net/intel-ixl-kmod/work/ixl-1.12.2/src
2 errors

make[2]: stopped in /usr/ports/net/intel-ixl-kmod/work/ixl-1.12.2/src
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/intel-ixl-kmod
*** Error code 1

Stop.
make: stopped in /usr/ports/net/intel-ixl-kmod
Comment 2 Santiago Martinez 2022-06-23 18:33:57 UTC
this is with auto. which when loaded and interfaces come up, makes the kernel to panic.
==>  Building for intel-ixl-kmod-1.12.2
--- objwarn ---
Warning: Object directory not changed from original /usr/ports/net/intel-ixl-kmod/work/ixl-1.12.2/src
--- if_ixl.o ---
--- ixl_txrx.o ---
--- if_ixl.o ---
cc  -O2 -pipe -fno-strict-aliasing  -DSMP -DINET -DINET6 -DIXL_STANDALONE_BUILD -DPCI_IOV -DIXL_IW  -D_KERNEL -DKLD_MODULE -nostdinc   -include /usr/ports/net/intel-ixl-kmod/work/ixl-1.12.2/src/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include     -MD  -MF.depend.if_ixl.o -MTif_ixl.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error=tautological-compare -Wno-error=empty-body -Wno-error=parentheses-equality -Wno-error=unused-function -Wno-error=pointer-sign -Wno-error=shift-negative-value -Wno-address-of-packed-member -Wno-error=unused-but-set-variable -Wno-format-zero-length   -mno-aes -mno-avx  -std=iso9899:1999 -c if_ixl.c -o if_ixl.o
--- ixl_txrx.o ---
cc  -O2 -pipe -fno-strict-aliasing  -DSMP -DINET -DINET6 -DIXL_STANDALONE_BUILD -DPCI_IOV -DIXL_IW  -D_KERNEL -DKLD_MODULE -nostdinc   -include /usr/ports/net/intel-ixl-kmod/work/ixl-1.12.2/src/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include     -MD  -MF.depend.ixl_txrx.o -MTixl_txrx.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error=tautological-compare -Wno-error=empty-body -Wno-error=parentheses-equality -Wno-error=unused-function -Wno-error=pointer-sign -Wno-error=shift-negative-value -Wno-address-of-packed-member -Wno-error=unused-but-set-variable -Wno-format-zero-length   -mno-aes -mno-avx  -std=iso9899:1999 -c ixl_txrx.c -o ixl_txrx.o
ixl_txrx.c:474:12: warning: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Wincompatible-pointer-types]
        device_t                dev = vsi->dev;
                                ^     ~~~~~~~~
--- if_ixl.o ---
if_ixl.c:355:11: warning: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Wincompatible-pointer-types]
        device_t dev = pf->dev;
                 ^     ~~~~~~~
if_ixl.c:366:22: warning: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Wincompatible-pointer-types]
        ixl_setup_interface(pf->dev, vsi);
                            ^~~~~~~
./ixl_pf.h:296:33: note: passing argument to parameter here
int     ixl_setup_interface(device_t, struct ixl_vsi *);
                                    ^
--- ixl_txrx.o ---
ixl_txrx.c:918:23: warning: variable 'tx_desc' set but not used [-Wunused-but-set-variable]
        struct i40e_tx_desc     *tx_desc, *eop_desc;
                                 ^
ixl_txrx.c:918:33: warning: variable 'eop_desc' set but not used [-Wunused-but-set-variable]
        struct i40e_tx_desc     *tx_desc, *eop_desc;
                                           ^
--- if_ixl.o ---
if_ixl.c:433:10: warning: incompatible pointer types assigning to 'struct device *' from 'device_t' (aka 'struct _device *') [-Wincompatible-pointer-types]
        pf->dev = pf->osdep.dev = dev;
                ^ ~~~~~~~~~~~~~~~~~~~
--- ixl_txrx.o ---
ixl_txrx.c:1038:23: warning: variable 'tx_desc' set but not used [-Wunused-but-set-variable]
        struct i40e_tx_desc     *tx_desc, *eop_desc;
                                 ^
ixl_txrx.c:1267:13: warning: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Wincompatible-pointer-types]
        device_t                dev = vsi->dev;
                                ^     ~~~~~~~~
--- if_ixl.o ---
if_ixl.c:876:11: warning: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Wincompatible-pointer-types]
        device_t dev = pf->dev;
                 ^     ~~~~~~~
--- ixl_txrx.o ---
ixl_txrx.c:2059:17: warning: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Wincompatible-pointer-types]
                device_printf(dev, "Invalid tx_ring_size value of %d set!\n",
                              ^~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
ixl_txrx.c:2061:17: warning: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Wincompatible-pointer-types]
                device_printf(dev, "tx_ring_size must be between %d and %d, "
                              ^~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
ixl_txrx.c:2064:17: warning: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Wincompatible-pointer-types]
                device_printf(dev, "Using default value of %d instead\n",
                              ^~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
ixl_txrx.c:2073:17: warning: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Wincompatible-pointer-types]
                device_printf(dev, "Invalid rx_ring_size value of %d set!\n",
                              ^~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
ixl_txrx.c:2075:17: warning: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Wincompatible-pointer-types]
                device_printf(dev, "rx_ring_size must be between %d and %d, "
                              ^~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
ixl_txrx.c:2078:17: warning: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Wincompatible-pointer-types]
                device_printf(dev, "Using default value of %d instead\n",
                              ^~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
ixl_txrx.c:2084:16: warning: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Wincompatible-pointer-types]
        device_printf(dev, "using %d tx descriptors and %d rx descriptors\n",
                      ^~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
ixl_txrx.c:2107:11: warning: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Wincompatible-pointer-types]
        device_t dev = vsi->dev;
                 ^     ~~~~~~~~
--- if_ixl.o ---
4 warnings generated.
--- ixl_txrx.o ---
13 warnings generated.
--- if_ixl.ko ---
ld -m elf_x86_64_fbsd -d -warn-common --build-id=sha1 -T /usr/src/sys/conf/ldscript.kmod.amd64 -r -d  -o if_ixl.ko if_ixl.o ixl_pf_main.o ixl_pf_qmgr.o ixl_txrx.o ixl_pf_i2c.o i40e_osdep.o i40e_common.o i40e_nvm.o i40e_adminq.o i40e_lan_hmc.o i40e_hmc.o i40e_dcb.o freebsd_compat_common.o ixl_pf_iov.o ixl_iw.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk if_ixl.ko  export_syms | xargs -J% objcopy % if_ixl.ko
objcopy --strip-debug if_ixl.ko
===>  Staging for intel-ixl-kmod-1.12.2
===>   Generating temporary packing list
install  -m 555 /usr/ports/net/intel-ixl-kmod/work/ixl-1.12.2/src/if_ixl.ko /usr/ports/net/intel-ixl-kmod/work/stage/boot/modules/if_ixl_updated.ko
install  -m 444 /usr/ports/net/intel-ixl-kmod/work/ixl-1.12.2/src/ixl.4 /usr/ports/net/intel-ixl-kmod/work/stage/usr/local/man/man4/
/bin/ln /usr/ports/net/intel-ixl-kmod/work/stage/usr/local/man/man4/ixl.4 /usr/ports/net/intel-ixl-kmod/work/stage/usr/local/man/man4/if_ixl.4
Comment 3 Santiago Martinez 2022-06-23 18:36:45 UTC
Created attachment 234900 [details]
This is the crash when the intel-ixl-kmod ( with netmap option in auto) is loaded and the port comes up.

This is the crash when the intel-ixl-kmod ( with netmap option in auto) is loaded and the port comes up.
Comment 4 Piotr Kubaj freebsd_committer freebsd_triage 2023-06-06 16:54:36 UTC
Can you try using the newer version from https://www.intel.com/content/www/us/en/download/18331/intel-network-adapter-driver-for-intel-ethernet-controller-700-series-under-freebsd.html to check whether the error happens on it as well?
Comment 5 Santiago Martinez 2023-08-22 21:05:19 UTC
Hi, sorry I didnt see your message before.
I will test tomorrow it tomorrow and let you know.
Cheers
Comment 6 Santiago Martinez 2023-08-22 21:05:45 UTC
Hi, sorry I didnt see your message before.
I will test tomorrow it tomorrow and let you know.
Cheers