You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
F-Stack's DPDK cannot be compiled in CentOS 7 #238
Try to build F-Stack's DPDK 17.11.2 LTS in CentOS 7.5.
$ uname -a
Linux localhost.localdomain 3.10.0-862.3.3.el7.x86_64 #1 SMP Fri Jun 15 04:15:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ make config T=x86_64-native-linuxapp-gcc
$ make
[...]
CC [M] /home/phucnm/workspace/f-stack/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.o
/home/phucnm/workspace/f-stack/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.c:704:2: error: unknown field ‘ndo_change_mtu’ specified in initializer
.ndo_change_mtu = kni_net_change_mtu,
^
/home/phucnm/workspace/f-stack/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.c:704:2: warning: missing braces around initializer [-Wmissing-braces]
/home/phucnm/workspace/f-stack/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.c:704:2: warning: (near initialization for ‘kni_net_netdev_ops.<anonymous>’) [-Wmissing-braces]
/home/phucnm/workspace/f-stack/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.c:704:2: warning: initialization from incompatible pointer type [enabled by default]
/home/phucnm/workspace/f-stack/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.c:704:2: warning: (near initialization for ‘kni_net_netdev_ops.<anonymous>.ndo_select_queue’) [enabled by default]
make[8]: *** [/home/phucnm/workspace/f-stack/dpdk/build/build/lib/librte_eal/linuxapp/kni/kni_net.o] Error 1
make[7]: *** [_module_/home/phucnm/workspace/f-stack/dpdk/build/build/lib/librte_eal/linuxapp/kni] Error 2
make[6]: *** [sub-make] Error 2
make[5]: *** [rte_kni.ko] Error 2
make[4]: *** [kni] Error 2
make[3]: *** [linuxapp] Error 2
make[2]: *** [librte_eal] Error 2
make[1]: *** [lib] Error 2
make: *** [all] Error 2
Upgrading to DPDK 18.05 fixes this issue. However, I still want to use the current F-Stack sdk, so I want to downgrade my CentOS's kernel. I want to ask which kernel was used in the Quick Start and AWS guides?
Actually, we tested kernel 3.10 ~ 4.15, but we hadn't test all the distributions, and Centos 7.2, Redhat7.3, Ubuntu 14.04 ~ 18.04 worked fine.
This error is caused by kni compiling, you can just disable kni.
@whl739 I've met the same error. How to disable kni manually?
Additionally, it seems kni has been disabled in this commit but the same error still appears
[root@localhost dpdk-17.11]# vim ./lib/librte_eal/linuxapp/kni/kni_net.c
[root@localhost dpdk-17.11]# vim /usr/src/kernels/3.10.0-57.10.1.el7.x86_64/include/linux/netdevice.h
两边不一样,kni_net.c改成netdevice.h中定义可以解决
[root@localhost dpdk-17.11]# vim ./lib/librte_eal/linuxapp/kni/kni_net.c
[root@localhost dpdk-17.11]# vim /usr/src/kernels/3.10.0-57.10.1.el7.x86_64/include/linux/netdevice.h
两边不一样,kni_net.c改成netdevice.h中定义可以解决
This issue is caused by an incompatibility between DPDK 17.11.2 (bundled with an older F-Stack) and Linux kernel 3.10 (CentOS 7). Specifically, the ndo_change_mtu field was removed from struct net_device_ops in kernels 4.15+ and some RHEL/CentOS backport kernels use a renamed variant (e.g., ndo_change_mtu_rh75).
This is a known upstream DPDK issue that has long been fixed:
DPDK 18.05+ resolves the ndo_change_mtu incompatibility.
Current F-Stack ships with DPDK 22.11 LTS, which no longer uses the old KNI module (rte_kni.ko) at all — KNI has been replaced by virtio_user + vhost-net (see commit b6692e644, 2025-11-03).
As a result, this specific issue is completely obsolete in the current codebase. There is no longer a kni_net.c with ndo_change_mtu to worry about.
Closing as obsolete — fixed by DPDK/F-Stack upgrade. Please use the latest F-Stack release.
Activity
whl739 commentedon Jun 27, 2018
Actually, we tested kernel 3.10 ~ 4.15, but we hadn't test all the distributions, and Centos 7.2, Redhat7.3, Ubuntu 14.04 ~ 18.04 worked fine.
This error is caused by kni compiling, you can just disable kni.
yingfeng commentedon Jun 28, 2018
@whl739 I've met the same error. How to disable kni manually?
Additionally, it seems kni has been disabled in this commit but the same error still appears
whl739 commentedon Jun 28, 2018
Edit
dpdk/x86_64-native-linuxapp-gcc/.config, change the value of KNI related section from 'y' to 'n'.yingfeng commentedon Jun 28, 2018
thank you, it works now
Smiledarshu commentedon Apr 24, 2019
Hi @whl739
i can't able to find .config file inside dpdk/x86_64-native-linuxapp-gcc/ after compiling.
Any help would be appreciated.
Thanks
gitusermavux commentedon Apr 28, 2019
There is another solution, modify "dpdk/config/common_linuxapp". Search for KNI and change all "YES" to "NO".
wyao51 commentedon Oct 8, 2019
用find / -name netdevice.h 查找内核中的头文件,找到struct net_device_ops 中的 ndo_change_mtu,
会看到ndo_change_mtu被替换成对应版本的ndo_change_mtu_rhXX,比如 ndo_change_mtu_rh75 将 /kni_net.c:704:2 中 ndo_change_mtu 用 ndo_change_mtu_rh75 替换试试?
wyao51 commentedon Oct 8, 2019
[root@localhost dpdk-17.11]# vim ./lib/librte_eal/linuxapp/kni/kni_net.c
[root@localhost dpdk-17.11]# vim /usr/src/kernels/3.10.0-57.10.1.el7.x86_64/include/linux/netdevice.h
两边不一样,kni_net.c改成netdevice.h中定义可以解决
Pingmin commentedon Apr 12, 2021
今天(20210412)在
CentOS 7.9.2009上编译一个 USB 转 RJ45 网卡设备 的 驱动 (src tar ball)时,也遇到了这个unknown field ‘ndo_change_mtu’错误:然后,按照你说的方法,将
ax88179_178a.c中的初始化成员名改成了与/usr/src/kernels/3.10.0-1160.15.2.el7.x86_64/include/linux/netdevice.h中定义一样的ndo_change_mtu_rh74,就可以编译了。20210413 更新:
根据网上一些资料,是因为
RHEL/CentOS从7.4开始,ndo_change_mtu被改成了ndo_change_mtu_rh74,故针对RHEL/CentOS 7.4+,可以添加一个如下 define 宏定义便可(其他保持不变):谢谢!
Rename to ndo_change_mtu_rh74 only for RHEL/CentOS 7.4+
jfb8856606 commentedon Mar 20, 2026
This issue is caused by an incompatibility between DPDK 17.11.2 (bundled with an older F-Stack) and Linux kernel 3.10 (CentOS 7). Specifically, the
ndo_change_mtufield was removed fromstruct net_device_opsin kernels 4.15+ and some RHEL/CentOS backport kernels use a renamed variant (e.g.,ndo_change_mtu_rh75).This is a known upstream DPDK issue that has long been fixed:
ndo_change_mtuincompatibility.rte_kni.ko) at all — KNI has been replaced by virtio_user + vhost-net (see commitb6692e644, 2025-11-03).As a result, this specific issue is completely obsolete in the current codebase. There is no longer a
kni_net.cwithndo_change_mtuto worry about.Closing as obsolete — fixed by DPDK/F-Stack upgrade. Please use the latest F-Stack release.