我有 ubuntu server 18.04.3,并尝试通过导航到 ixgbe/src 文件夹并运行来为我的新 X550-10g-T1 网络适配器卡安装 ixgbe 5.6.3 驱动程序
make install
我收到一堆错误,但我不知道它们是什么意思
below:make[1]: Entering directory '/usr/src/linux-headers-5.3.9-050309-generic'
CC [M] /home/jonathan/ixgbe-5.6.3/src/ixgbe_main.o
In file included from /home/jonathan/ixgbe-5.6.3/src/kcompat.h:68:0,
from /home/jonathan/ixgbe-5.6.3/src/ixgbe_osdep.h:17,
from /home/jonathan/ixgbe-5.6.3/src/ixgbe_type.h:45,
from /home/jonathan/ixgbe-5.6.3/src/ixgbe_dcb.h:7,
from /home/jonathan/ixgbe-5.6.3/src/ixgbe.h:24,
from /home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:31:
./include/generated/utsrelease.h:2:32: error: invalid digit "9" in octal constant
#define UTS_UBUNTU_RELEASE_ABI 050309
^
/home/jonathan/ixgbe-5.6.3/src/kcompat.h:814:5: note: in expansion of macro ‘UTS_UBUNTU_RELEASE_ABI’
#if UTS_UBUNTU_RELEASE_ABI > 255
^~~~~~~~~~~~~~~~~~~~~~
./include/generated/utsrelease.h:2:32: error: invalid digit "9" in octal constant
#define UTS_UBUNTU_RELEASE_ABI 050309
^
/home/jonathan/ixgbe-5.6.3/src/kcompat.h:812:9: note: in expansion of macro ‘UTS_UBUNTU_RELEASE_ABI’
UTS_UBUNTU_RELEASE_ABI)
^~~~~~~~~~~~~~~~~~~~~~
/home/jonathan/ixgbe-5.6.3/src/kcompat.h:5049:6: note: in expansion of macro ‘UBUNTU_VERSION_CODE’
#if (UBUNTU_VERSION_CODE && UBUNTU_VERSION_CODE >= UBUNTU_VERSION(3,13,0,24))
^~~~~~~~~~~~~~~~~~~
./include/generated/utsrelease.h:2:32: error: invalid digit "9" in octal constant
#define UTS_UBUNTU_RELEASE_ABI 050309
^
/home/jonathan/ixgbe-5.6.3/src/kcompat.h:812:9: note: in expansion of macro ‘UTS_UBUNTU_RELEASE_ABI’
UTS_UBUNTU_RELEASE_ABI)
^~~~~~~~~~~~~~~~~~~~~~
/home/jonathan/ixgbe-5.6.3/src/kcompat.h:5049:29: note: in expansion of macro ‘UBUNTU_VERSION_CODE’
#if (UBUNTU_VERSION_CODE && UBUNTU_VERSION_CODE >= UBUNTU_VERSION(3,13,0,24))
^~~~~~~~~~~~~~~~~~~
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:10990:12: warning: ‘struct tc_block_offload’ declared inside parameter list will not be visible outside of this definition or declaration
struct tc_block_offload *f)
^~~~~~~~~~~~~~~~
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c: In function ‘ixgbe_setup_tc_block’:
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:10994:7: error: dereferencing pointer to incomplete type ‘struct tc_block_offload’
if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
^~
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:10994:24: error: ‘TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS’ undeclared (first use in this function); did you mean ‘FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS’?
if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:10994:24: note: each undeclared identifier is reported only once for each function it appears in
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:10998:7: error: ‘TC_BLOCK_BIND’ undeclared (first use in this function); did you mean ‘FLOW_BLOCK_BIND’?
case TC_BLOCK_BIND:
^~~~~~~~~~~~~
FLOW_BLOCK_BIND
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:10999:10: error: implicit declaration of function ‘tcf_block_cb_register’; did you mean ‘tc_indr_block_cb_register’? -Werror=implicit-function-declaration]
return tcf_block_cb_register(f->block, ixgbe_setup_tc_block_cb,
^~~~~~~~~~~~~~~~~~~~~
tc_indr_block_cb_register
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:11005:7: error: ‘TC_BLOCK_UNBIND’ undeclared (first use in this function); did you mean ‘TC_BLOCK_BIND’?
case TC_BLOCK_UNBIND:
^~~~~~~~~~~~~~~
TC_BLOCK_BIND
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:11006:3: error: implicit declaration of function ‘tcf_block_cb_unregister’; did you mean ‘tc_indr_block_cb_unregister’? [-Werror=implicit-function-declaration]
tcf_block_cb_unregister(f->block, ixgbe_setup_tc_block_cb,
^~~~~~~~~~~~~~~~~~~~~~~
tc_indr_block_cb_unregister
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c: At top level:
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:11878:22: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.ndo_select_queue = ixgbe_select_queue,
^~~~~~~~~~~~~~~~~~
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:11878:22: note: (near initialization for ‘ixgbe_netdev_ops.ndo_select_queue’)
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c: In function ‘ixgbe_setup_tc_block’:
/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.c:11012:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
scripts/Makefile.build:280: recipe for target '/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.o' failed
make[2]: *** [/home/jonathan/ixgbe-5.6.3/src/ixgbe_main.o] Error 1
Makefile:1626: recipe for target '_module_/home/jonathan/ixgbe-5.6.3/src' failed
make[1]: *** [_module_/home/jonathan/ixgbe-5.6.3/src] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.3.9-050309-generic'
Makefile:87: recipe for target 'default' failed
make: *** [default] Error 2
我按照自述文件的操作,它告诉我获取 tar 并将其解压,然后进入 src 文件夹并执行 make install
我的内核版本是5.3.9
编辑:ubuntu 清楚地看到了新安装的 NIC,但无法使用它或安装驱动程序
请参阅lspci-nnk| grep 0200 -A3
jonathan@jonney-linux-server:~$ lspci -nnk | grep 0200 -A3
01:00.0 Ethernet controller [0200]: Intel Corporation Ethernet Controller 10G X550T [8086:15d1] (rev 01)
Subsystem: Intel Corporation Ethernet Converged Network Adapter X550-T1 [8086:0002]
Kernel driver in use: ixgbe
Kernel modules: ixgbe
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 09)
Subsystem: ASUSTeK Computer Inc. P8 series motherboard [1043:8505]
Kernel driver in use: r8169
Kernel modules: r8169
编辑:根据要求添加更多日志。
https://drive.google.com/open?id=11r6SOjA1lHObAN28lk9XBHrU2lbKzDa0
抱歉,我无法复制和粘贴文本,因为我现在直接从 ubuntu 服务器本地运行这些命令(因为我无法通过 ssh 连接到新的以太网适配器以通过我的桌面操作系统机器运行它)
答案1
啊哈,我让它工作了!
我将其添加到 netplan 中,还删除了旧网络设备上的先前“分配的静态 ip”,这样就可以了
network:
version: 2
ethernets:
enp0s3:
dhcp4: yes
dhcp6: yes