Skip to content

CentOS Linux release 7.8.2003 (Core) error: unknown field ‘ndo_change_mtu’ specified in initializer #307

Open

Description

@vincentmli

I am running mTCP on CentOS 7.8.2003 release kernel 3.10.0-1127.el7.x86_64, installed kernel devel package that is required by building igb_uio

ls -l /lib/modules/3.10.0-1127.el7.x86_64/
total 3296
lrwxrwxrwx   1 root root     44 Aug  4 20:05 build -> /usr/src/kernels/3.10.0-1127.18.2.el7.x86_64

got errors when building dpdk_iface.o

[35] Exit Script

Option: 35

Setting RTE_TARGET as x86_64-native-linuxapp-gcc
/usr/src/mtcp
Set RTE_SDK env variable as /usr/src/mtcp/dpdk
Set RTE_TARGET env variable as x86_64-native-linuxapp-gcc
Are you using an Intel NIC (y/n)? y
Creating dpdk interface entries
make -C /lib/modules/3.10.0-1127.el7.x86_64/build/ M=/usr/src/mtcp/dpdk-iface-kmod modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-1127.18.2.el7.x86_64'
  CC [M]  /usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.o
In file included from /usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.c:32:0:
/usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.h:148:9: error: unknown field ‘ndo_change_mtu’ specified in initializer
         .ndo_change_mtu         = NULL,
         ^
/usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.h:154:9: error: unknown field ‘ndo_set_vf_vlan’ specified in initializer
         .ndo_set_vf_vlan        = NULL,
         ^
/usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.h:163:9: error: unknown field ‘ndo_setup_tc’ specified in initializer
         .ndo_setup_tc           = NULL,
         ^
make[2]: *** [/usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.o] Error 1
make[1]: *** [_module_/usr/src/mtcp/dpdk-iface-kmod] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-1127.18.2.el7.x86_64'
make: *** [all] Error 2
make -C /lib/modules/3.10.0-1127.el7.x86_64/build/ M=/usr/src/mtcp/dpdk-iface-kmod modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-1127.18.2.el7.x86_64'
  CC [M]  /usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.o
In file included from /usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.c:32:0:
/usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.h:148:9: error: unknown field ‘ndo_change_mtu’ specified in initializer
         .ndo_change_mtu         = NULL,
         ^
/usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.h:154:9: error: unknown field ‘ndo_set_vf_vlan’ specified in initializer
         .ndo_set_vf_vlan        = NULL,
         ^
/usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.h:163:9: error: unknown field ‘ndo_setup_tc’ specified in initializer
         .ndo_setup_tc           = NULL,
         ^
make[2]: *** [/usr/src/mtcp/dpdk-iface-kmod/dpdk_iface.o] Error 1
make[1]: *** [_module_/usr/src/mtcp/dpdk-iface-kmod] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-1127.18.2.el7.x86_64'
make: *** [all] Error 2

found similar issue F-Stack/f-stack#238

so fixed it temporarily with diff below

diff --git a/dpdk-iface-kmod/dpdk_iface.h b/dpdk-iface-kmod/dpdk_iface.h
index a498685..c6df2d6 100644
--- a/dpdk-iface-kmod/dpdk_iface.h
+++ b/dpdk-iface-kmod/dpdk_iface.h
@@ -145,13 +145,13 @@ static const struct net_device_ops netdev_ops = {
         .ndo_set_rx_mode        = netdev_no_ret,
         .ndo_validate_addr      = netdev_open,
         .ndo_set_mac_address    = NULL,
-        .ndo_change_mtu         = NULL,
+        .ndo_change_mtu_rh74    = NULL,
         .ndo_tx_timeout         = netdev_no_ret,
         .ndo_vlan_rx_add_vid    = NULL,
         .ndo_vlan_rx_kill_vid   = NULL,
         .ndo_do_ioctl           = NULL,
         .ndo_set_vf_mac         = NULL,
-        .ndo_set_vf_vlan        = NULL,
+        .ndo_set_vf_vlan_rh73        = NULL,
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 15, 0)
         .ndo_set_vf_tx_rate     = NULL,
 #else
@@ -160,7 +160,7 @@ static const struct net_device_ops netdev_ops = {
         .ndo_set_vf_spoofchk    = NULL,
         .ndo_get_vf_config      = NULL,
         .ndo_get_stats          = netdev_stats,
-        .ndo_setup_tc           = NULL,
+        .ndo_setup_tc_rh72           = NULL,
 #ifdef CONFIG_NET_POLL_CONTROLLER
         .ndo_poll_controller    = netdev_no_ret,
        .ndo_netpoll_setup      = NULL,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions