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 with kernel 5.6.3 - compilation problem #572

Closed
mapetenator opened this issue Apr 13, 2020 · 6 comments
Closed

PF_RING with kernel 5.6.3 - compilation problem #572

mapetenator opened this issue Apr 13, 2020 · 6 comments
Assignees

Comments

@mapetenator
Copy link

I tried to compile PF_RING with the new kernel version...

#make -C /lib/modules/5.6.3/build SUBDIRS=/usr/src/PF_RING/kernel EXTRA_CFLAGS='-I/usr/src/PF_RING/kernel -DGIT_REV=""dev:12fa75e4487bc6b91fef8e8448790131a2f6b004"" -no-pie -fno-pie -Wno-implicit-fallthrough' modules
make -C /lib/modules/5.6.3/build M=/usr/src/PF_RING/kernel EXTRA_CFLAGS='-I/usr/src/PF_RING/kernel -DGIT_REV=""dev:12fa75e4487bc6b91fef8e8448790131a2f6b004"" -no-pie -fno-pie -Wno-implicit-fallthrough' modules
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[1]: Entering directory '/usr/src/linux-5.6.3'
CC [M] /usr/src/PF_RING/kernel/pf_ring.o
In file included from /usr/src/PF_RING/kernel/pf_ring.c:131:0:
/usr/src/PF_RING/kernel/linux/pf_ring.h:339:18: error: field 'ts' has incomplete type
struct timeval ts; /* time stamp */
^~
/usr/src/PF_RING/kernel/pf_ring.c: In function 'ring_proc_add':
/usr/src/PF_RING/kernel/pf_ring.c:1058:63: error: passing argument 4 of 'proc_create_data' from incompatible pointer type [-Werror=incompatible-pointer-types]
proc_create_data(pfr->sock_proc_name, 0, netns->proc_dir, &ring_proc_fops, pfr);
^
In file included from /usr/src/PF_RING/kernel/pf_ring.c:99:0:
./include/linux/proc_fs.h:59:31: note: expected 'const struct proc_ops *' but argument is of type 'const struct file_operations *'
extern struct proc_dir_entry *proc_create_data(const char , umode_t,
^~~~~~~~~~~~~~~~
/usr/src/PF_RING/kernel/pf_ring.c: In function 'ring_proc_init':
/usr/src/PF_RING/kernel/pf_ring.c:1713:6: error: passing argument 4 of 'proc_create' from incompatible pointer type [-Werror=incompatible-pointer-types]
&ring_proc_fops /
file operations */);
^
In file included from /usr/src/PF_RING/kernel/pf_ring.c:99:0:
./include/linux/proc_fs.h:64:24: note: expected 'const struct proc_ops *' but argument is of type 'const struct file_operations *'
struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops proc_ops);
^~~~~~~~~~~
/usr/src/PF_RING/kernel/pf_ring.c: In function 'set_skb_time':
/usr/src/PF_RING/kernel/pf_ring.c:2838:13: error: implicit declaration of function 'ktime_to_timeval' [-Werror=implicit-function-declaration]
hdr->ts = ktime_to_timeval(skb->tstamp);
^~~~~~~~~~~~~~~~
/usr/src/PF_RING/kernel/pf_ring.c: In function 'add_virtual_filtering_device':
/usr/src/PF_RING/kernel/pf_ring.c:4566:8: error: passing argument 4 of 'proc_create_data' from incompatible pointer type [-Werror=incompatible-pointer-types]
&ring_proc_virtual_filtering_fops /
read */,
^
In file included from /usr/src/PF_RING/kernel/pf_ring.c:99:0:
./include/linux/proc_fs.h:59:31: note: expected 'const struct proc_ops *' but argument is of type 'const struct file_operations *'
extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
^~~~~~~~~~~~~~~~
/usr/src/PF_RING/kernel/pf_ring.c: In function 'setSocketStats':
/usr/src/PF_RING/kernel/pf_ring.c:6624:9: error: passing argument 4 of 'proc_create_data' from incompatible pointer type [-Werror=incompatible-pointer-types]
&ring_proc_stats_fops, pfr)) == NULL) {
^
In file included from /usr/src/PF_RING/kernel/pf_ring.c:99:0:
./include/linux/proc_fs.h:59:31: note: expected 'const struct proc_ops *' but argument is of type 'const struct file_operations *'
extern struct proc_dir_entry *proc_create_data(const char , umode_t,
^~~~~~~~~~~~~~~~
/usr/src/PF_RING/kernel/pf_ring.c: In function 'add_device_to_proc':
/usr/src/PF_RING/kernel/pf_ring.c:8219:5: error: passing argument 4 of 'proc_create_data' from incompatible pointer type [-Werror=incompatible-pointer-types]
&ring_proc_dev_fops /
read */,
^
In file included from /usr/src/PF_RING/kernel/pf_ring.c:99:0:
./include/linux/proc_fs.h:59:31: note: expected 'const struct proc_ops *' but argument is of type 'const struct file_operations *'
extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
^~~~~~~~~~~~~~~~
/usr/src/PF_RING/kernel/pf_ring.c: At top level:
cc1: warning: unrecognized command line option '-Wno-implicit-fallthrough'
cc1: some warnings being treated as errors
scripts/Makefile.build:267: recipe for target '/usr/src/PF_RING/kernel/pf_ring.o' failed
make[2]: *** [/usr/src/PF_RING/kernel/pf_ring.o] Error 1
Makefile:1683: recipe for target '/usr/src/PF_RING/kernel' failed
make[1]: *** [/usr/src/PF_RING/kernel] Error 2
make[1]: Leaving directory '/usr/src/linux-5.6.3'
Makefile:66: recipe for target 'all' failed
make: *** [all] Error 2

@cardigliano
Copy link
Member

@mapetenator what OS are you running? Please note we officially support latest Ubuntu/Centos/Debian LTS kernels. We will do our best to support also the latest one.

@mapetenator
Copy link
Author

Hi,
thank you for your response.
I use Debian GNU/Linux 9.12 (stretch).
Sorry, I didn't know you only support the official version.
I will be grateful for your help.

@emanuele-f emanuele-f self-assigned this Apr 22, 2020
@emanuele-f
Copy link
Contributor

We will add a temporary fix for this, but the long time solution is to implement #578

@emanuele-f
Copy link
Contributor

Fixed in 67a5ddd , 72b0946 and 4baed06

@mapetenator
Copy link
Author

Thank you very much!

@wlcrack
Copy link

wlcrack commented Mar 2, 2021

thank you sir , @emanuele-f and @cardigliano , it works wery well!

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

4 participants