Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pf_ring dkms (8.1.0-7556) does not compile for the 5.18.x kernel #817

Closed
rwhalb opened this issue Jun 21, 2022 · 3 comments
Closed

pf_ring dkms (8.1.0-7556) does not compile for the 5.18.x kernel #817

rwhalb opened this issue Jun 21, 2022 · 3 comments

Comments

@rwhalb
Copy link

rwhalb commented Jun 21, 2022

[root@nst36 pfring-8.1.0]# make
make -C /lib/modules/5.18.5-200.fc36.x86_64/build M=/usr/src/pfring-8.1.0 EXTRA_CFLAGS='-I/usr/src/pfring-8.1.0 -DGIT_REV=""dev:cabd2381e3bb623b5b22e670e9612b622fa94d49"" -no-pie -fno-pie -Wno-implicit-fallthrough' modules
make[1]: Entering directory '/usr/src/kernels/5.18.5-200.fc36.x86_64'
CC [M] /usr/src/pfring-8.1.0/pf_ring.o
In file included from ./include/linux/byteorder/little_endian.h:5,
from ./arch/x86/include/uapi/asm/byteorder.h:5,
from ./arch/x86/include/asm/orc_types.h:43,
from ./arch/x86/include/asm/unwind_hints.h:6,
from ./arch/x86/include/asm/nospec-branch.h:13,
from ./arch/x86/include/asm/paravirt_types.h:40,
from ./arch/x86/include/asm/ptrace.h:97,
from ./arch/x86/include/asm/math_emu.h:5,
from ./arch/x86/include/asm/processor.h:13,
from ./arch/x86/include/asm/timex.h:5,
from ./include/linux/timex.h:67,
from ./include/linux/time32.h:13,
from ./include/linux/time.h:60,
from ./include/linux/stat.h:19,
from ./include/linux/module.h:13,
from /usr/src/pfring-8.1.0/pf_ring.c:79:
/usr/src/pfring-8.1.0/pf_ring.c: In function ‘allocate_extra_dma_memory’:
/usr/src/pfring-8.1.0/pf_ring.c:4818:7: error: implicit declaration of function ‘pci_map_single’; did you mean ‘dma_map_single’? [-Werror=implicit-function-declaration]
4818 | pci_map_single(to_pci_dev(dma_memory->hwdev), slot,
| ^~~~~~~~~~~~~~
./include/uapi/linux/byteorder/little_endian.h:32:51: note: in definition of macro ‘__cpu_to_le64’
32 | #define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
| ^
/usr/src/pfring-8.1.0/pf_ring.c:4817:31: note: in expansion of macro ‘cpu_to_le64’
4817 | dma_memory->dma_addr[i] = cpu_to_le64(
| ^~~~~~~~~~~
/usr/src/pfring-8.1.0/pf_ring.c:4820:22: error: ‘PCI_DMA_BIDIRECTIONAL’ undeclared (first use in this function); did you mean ‘DMA_BIDIRECTIONAL’?
4820 | PCI_DMA_BIDIRECTIONAL));
| ^~~~~~~~~~~~~~~~~~~~~
./include/uapi/linux/byteorder/little_endian.h:32:51: note: in definition of macro ‘__cpu_to_le64’
32 | #define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
| ^
/usr/src/pfring-8.1.0/pf_ring.c:4817:31: note: in expansion of macro ‘cpu_to_le64’
4817 | dma_memory->dma_addr[i] = cpu_to_le64(
| ^~~~~~~~~~~
/usr/src/pfring-8.1.0/pf_ring.c:4820:22: note: each undeclared identifier is reported only once for each function it appears in
4820 | PCI_DMA_BIDIRECTIONAL));
| ^~~~~~~~~~~~~~~~~~~~~
./include/uapi/linux/byteorder/little_endian.h:32:51: note: in definition of macro ‘__cpu_to_le64’
32 | #define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
| ^
/usr/src/pfring-8.1.0/pf_ring.c:4817:31: note: in expansion of macro ‘cpu_to_le64’
4817 | dma_memory->dma_addr[i] = cpu_to_le64(
| ^~~~~~~~~~~
In file included from ./include/linux/skbuff.h:31,
from /usr/src/pfring-8.1.0/pf_ring.c:83:
/usr/src/pfring-8.1.0/pf_ring.c: In function ‘free_extra_dma_memory’:
/usr/src/pfring-8.1.0/pf_ring.c:4843:26: error: ‘PCI_DMA_BIDIRECTIONAL’ undeclared (first use in this function); did you mean ‘DMA_BIDIRECTIONAL’?
4843 | PCI_DMA_BIDIRECTIONAL);
| ^~~~~~~~~~~~~~~~~~~~~
./include/linux/dma-mapping.h:407:70: note: in definition of macro ‘dma_unmap_single’
407 | #define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, 0)
| ^
/usr/src/pfring-8.1.0/pf_ring.c: In function ‘pf_ring_inject_packet_to_stack’:
/usr/src/pfring-8.1.0/pf_ring.c:5833:9: error: implicit declaration of function ‘netif_rx_ni’; did you mean ‘netif_rx’? [-Werror=implicit-function-declaratio]
5833 | err = netif_rx_ni(skb);
| ^~~~~~~~~~~
| netif_rx
/usr/src/pfring-8.1.0/pf_ring.c: In function ‘ring_getsockopt’:
/usr/src/pfring-8.1.0/pf_ring.c:7888:26: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
7888 | char *dev_addr = pfr->ring_dev->dev->dev_addr;
| ^~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: /usr/src/pfring-8.1.0/pf_ring.o] Error 1
make[1]: *** [Makefile:1838: /usr/src/pfring-8.1.0] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.18.5-200.fc36.x86_64'
make: *** [Makefile:67: all] Error 2

@cardigliano
Copy link
Member

@rwhalb it seems you are running an unsupported kernel, we will fix this asap

@RayFoulk
Copy link
Contributor

I ran into this same problem(s) running 5.18.19, and worked up this patch based on clues found here:

https://bugs.gentoo.org/847154

https://www.mail-archive.com/arch-commits@lists.archlinux.org/msg321191.html

Fair warning: This is completely untested. YMMV.
0001-patch-for-kernel-5.18.X.patch.gz

@cardigliano
Copy link
Member

@RayFoulk could you send this as a PR please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants