在centOS错误

时间:2018-04-06 13:01:52

标签: linux centos driver linux-device-driver intel

我正在尝试为英特尔X710网卡构建旧版本的i40e驱动程序。 我必须使用旧版本的驱动程序,因为它们删除了我需要的功能。 我试图使用的版本是2016年10月5日的i40e-1.5.23。 如果我尝试构建最新版本,我不会收到任何错误。

我已经安装了"开发工具"包所以Kernel-Devel,gcc ...... 我当前的内核版本是3.10.0-693.21.1.el7.x86_64 我目前的CentOS版本是7.4.1708

我尝试了不同的内核/内核头版本,但仍然得到相同的错误。我也试过各种版本的i40e驱动程序。

在驱动程序的自述文件中,它写了内核和内核头文件必须是相同的版本,并且我确信它们在我的情况下。

以下是我尝试在驱动程序的src文件夹中输出的输出:

make[1]: Entering directory '/usr/src/kernels/3.10.0-693.21.1.el7.x86_64'
  CC [M]  /home/fla/Desktop/i40e-1.5.23/src/i40e_main.o
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:51:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/home/fla/Desktop/i40e-1.5.23/src/kcompat.h:5097:20: error: redefinition of ‘csum_replace_by_diff’
 static inline void csum_replace_by_diff(__sum16 *sum, __wsum diff)
                    ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/linux/skbuff.h:30:0,
                 from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/linux/tcp.h:21,
                 from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/tcp.h:24,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:27,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/checksum.h:110:20: note: previous definition of ‘csum_replace_by_diff’ was here
 static inline void csum_replace_by_diff(__sum16 *sum, __wsum diff)
                    ^~~~~~~~~~~~~~~~~~~~
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:51:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/home/fla/Desktop/i40e-1.5.23/src/kcompat.h:5131:1: error: redefinition of ‘pci_request_io_regions’
 pci_request_io_regions(struct pci_dev *pdev, const char *name)
 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:32:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/linux/pci.h:1425:1: note: previous definition of ‘pci_request_io_regions’ was here
 pci_request_io_regions(struct pci_dev *pdev, const char *name)
 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:51:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/home/fla/Desktop/i40e-1.5.23/src/kcompat.h:5138:1: error: redefinition of ‘pci_release_io_regions’
 pci_release_io_regions(struct pci_dev *pdev)
 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:32:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/linux/pci.h:1432:1: note: previous definition of ‘pci_release_io_regions’ was here
 pci_release_io_regions(struct pci_dev *pdev)
 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:51:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/home/fla/Desktop/i40e-1.5.23/src/kcompat.h:5145:1: error: redefinition of ‘pci_request_mem_regions’
 pci_request_mem_regions(struct pci_dev *pdev, const char *name)
 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:32:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/linux/pci.h:1439:1: note: previous definition of ‘pci_request_mem_regions’ was here
 pci_request_mem_regions(struct pci_dev *pdev, const char *name)
 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:51:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/home/fla/Desktop/i40e-1.5.23/src/kcompat.h:5152:1: error: redefinition of ‘pci_release_mem_regions’
 pci_release_mem_regions(struct pci_dev *pdev)
 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:32:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/linux/pci.h:1446:1: note: previous definition of ‘pci_release_mem_regions’ was here
 pci_release_mem_regions(struct pci_dev *pdev)
 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/vxlan.h:5:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:30:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/udp_tunnel.h:103:6: error: nested redefinition of ‘enum udp_parsable_tunnel_type’
 enum udp_parsable_tunnel_type {
      ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/udp_tunnel.h:103:6: error: redeclaration of ‘enum udp_parsable_tunnel_type’
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:51:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/home/fla/Desktop/i40e-1.5.23/src/kcompat.h:5120:6: note: originally defined here
 enum udp_parsable_tunnel_type {
      ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/vxlan.h:5:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:30:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/udp_tunnel.h:104:2: error: redeclaration of enumerator ‘UDP_TUNNEL_TYPE_VXLAN’
  UDP_TUNNEL_TYPE_VXLAN,  /* RFC 7348 */
  ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:51:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/home/fla/Desktop/i40e-1.5.23/src/kcompat.h:5121:2: note: previous definition of ‘UDP_TUNNEL_TYPE_VXLAN’ was here
  UDP_TUNNEL_TYPE_VXLAN,
  ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/vxlan.h:5:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:30:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/udp_tunnel.h:105:2: error: redeclaration of enumerator ‘UDP_TUNNEL_TYPE_GENEVE’
  UDP_TUNNEL_TYPE_GENEVE,  /* draft-ietf-nvo3-geneve */
  ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:51:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/home/fla/Desktop/i40e-1.5.23/src/kcompat.h:5122:2: note: previous definition of ‘UDP_TUNNEL_TYPE_GENEVE’ was here
  UDP_TUNNEL_TYPE_GENEVE,
  ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/vxlan.h:5:0,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:30:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/udp_tunnel.h:109:8: error: redefinition of ‘struct udp_tunnel_info’
 struct udp_tunnel_info {
    ^~~~~~~~~~~~~~~
In file included from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/sock.h:51:0,
                 from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/linux/tcp.h:23,
                 from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/tcp.h:24,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:27,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/linux/netdevice.h:67:8: note: originally defined here
 struct udp_tunnel_info;
        ^~~~~~~~~~~~~~~
/home/fla/Desktop/i40e-1.5.23/src/i40e_main.c: In function ‘i40e_tx_timeout’:
/home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:281:42: error: ‘struct net_device’ has no member named ‘trans_start’; did you mean ‘mem_start’?
   trans_start = q->trans_start ? : netdev->trans_start;
                                          ^~
/home/fla/Desktop/i40e-1.5.23/src/i40e_main.c: In function ‘i40e_ndo_bridge_getlink’:
/home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:9442:9: error: too few arguments to function ‘ndo_dflt_bridge_getlink’
  return ndo_dflt_bridge_getlink(skb, pid, seq, dev, veb->bridge_mode,
         ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/dst.h:13:0,
                 from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/sock.h:72,
                 from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/linux/tcp.h:23,
                 from /usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/net/tcp.h:24,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e.h:27,
                 from /home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:25:
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/include/linux/rtnetlink.h:115:12: note: declared here
 extern int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
            ^~~~~~~~~~~~~~~~~~~~~~~
/home/fla/Desktop/i40e-1.5.23/src/i40e_main.c: At top level:
/home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:9494:2: error: unknown field ‘ndo_set_vf_vlan’ specified in initializer
  .ndo_set_vf_vlan = i40e_ndo_set_vf_port_vlan,
  ^
/home/fla/Desktop/i40e-1.5.23/src/i40e_main.c: In function ‘i40e_ndo_bridge_getlink’:
/home/fla/Desktop/i40e-1.5.23/src/i40e_main.c:9451:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/scripts/Makefile.build:341: recipe for target '/home/fla/Desktop/i40e-1.5.23/src/i40e_main.o' failed
make[3]: *** [/home/fla/Desktop/i40e-1.5.23/src/i40e_main.o] Error 1
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/Makefile:1305: recipe for target '_module_/home/fla/Desktop/i40e-1.5.23/src' failed
make[2]: *** [_module_/home/fla/Desktop/i40e-1.5.23/src] Error 2
Makefile:140: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/usr/src/kernels/3.10.0-693.21.1.el7.x86_64'
Makefile:96: recipe for target 'default' failed
make: *** [default] Error 2

看起来错误来自kcompat.h。

我无法找到有关如何在其他地方解决此问题的任何信息,这就是我创建此帖子的原因。 任何帮助表示赞赏。

0 个答案:

没有答案