happysun110 发表于 2023-1-6 09:56

[请教] openwrt下怎么给hp544+网卡安装驱动?

如题,准备折腾一个all in one 机器,esxi 下安装 openwrt,主板上插了三块hp544+ 40g网卡,主板自带两个万兆电口,这些网口都直通给了 openwrt 的虚拟机。

openwrt 安装之后,主板自带的两个万兆电口正常识别,分别为 eth0 和 eth1,我分别设置为wan和lan,目前可以正常上网使用。但是hp544+ 40g网卡 无法识别。

我下载安装了最新的 kmod-mlx4-core_5.15.86-1_x86_64.ipk(其他依赖包也安装了),openwrt 的接口-lan下多出来 eth2 和 eth3 (奇怪只有两个而不是三个,我其实插了三张hp544+ 40g网卡)。但是我用 ip addr 和 ifconfig -a 等命令都看不到 eth2 和 eth3。

折腾了大半天,没有搞定。过来论坛请教高人,求指点!

tsaotse 发表于 2023-1-6 10:52

opkg update
opkg install pciutils
lspci|grep Ether

weston 发表于 2023-1-6 10:54

楼主的机器具体是啥配置啊,能不能列的详细一点参考一下,我也想整个性能高一点的all in one

tomatojack 发表于 2023-1-6 11:41

你要先检查硬件有没有被正确识别,dmesg, system boot log或lspci里可以查看(openwrt里不知道有没有这些工具,没有直接看系统启动日志)
硬件识别没有问题之后,就是修改一些配置文件了,查一下系统的配置逻辑仿照eth0什么搞一下就行

happysun110 发表于 2023-1-6 15:06

本帖最后由 happysun110 于 2023-1-6 16:19 编辑

tsaotse 发表于 2023-1-6 10:52
opkg update
opkg install pciutils
lspci|grep Ether

非常感谢!

lspci|grep Ether
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
03:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2
0b:00.0 Ethernet controller: Aquantia Corp. AQC108 NBase-T/IEEE 802.3bz Ethernet Controller

第一个和第二个是主板板载的千兆网卡(emc远程控制)和万兆网卡(x540 at2双口)。第三个是我插在主板pcie槽上的aqc108 5千兆网卡,准备当2.5g网卡用连接光猫2.5g口的,暂时也没有识别,不过感觉只是驱动的问题。我稍后试试。

三个hp544+网卡一个都没有识别,

更正,只是grep没找好关键字:


lspci | grep controller
00:0f.0 VGA compatible controller: VMware SVGA II Adapter
00:10.0 SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
02:00.0 USB controller: VMware USB1.1 UHCI Controller
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
02:02.0 USB controller: VMware USB2 EHCI Controller
03:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2
04:00.0 Network controller: Mellanox Technologies MT27520 Family
0b:00.0 Ethernet controller: Aquantia Corp. AQC108 NBase-T/IEEE 802.3bz Ethernet Controller
13:00.0 Network controller: Mellanox Technologies MT27520 Family
1b:00.0 Network controller: Mellanox Technologies MT27520 Family

网卡都在了。

happysun110 发表于 2023-1-6 15:12

weston 发表于 2023-1-6 10:54
楼主的机器具体是啥配置啊,能不能列的详细一点参考一下,我也想整个性能高一点的all in one ...

我瞎玩的,主要是想搞40g内网。

主板:联想rx450d 拆机的 x99 双路主板,两个pcie16x + 4个 pcie8x 插槽,板载两个万兆电口网卡,支持 emc(带一个千兆管理网口)
cpu:开始是两颗 2666v3,安装 esxi 后发现功耗太高,换成两颗低功耗的 2650l v3
网卡:hp544+ 40g网卡 x 3,计划再加一个2.5g双口或者四口网卡,暂时先用aqc 108凑合。
内存:ddr4 ecc reg 16g x 8
硬盘:若干,等折腾好之后把下载机和nas这两台机器都取消,all in one到这台机器来。主板带两个sata口和两个 minisas(可转8个sata)

开局不利,卡在openwrt不识别 hp544+ 上。

happysun110 发表于 2023-1-6 15:19

tomatojack 发表于 2023-1-6 11:41
你要先检查硬件有没有被正确识别,dmesg, system boot log或lspci里可以查看(openwrt里不知道有没有这些工 ...

3块 hp544+ 网卡在 esxi 中都被正确识别,也都可以设置直通。但是在 openwrt下 目前看是没有被识别。不知道问题出现在哪里,bios、efi的设置会有影响吗?我试试进虚拟机的bios看看能不能看到这三块网卡。

谢谢指点!

九天御风 发表于 2023-1-6 15:39

我估摸着你得自己编译OPWRT了,网上找驱动自己加进去。我也不会,别问我。

weston 发表于 2023-1-6 15:56

本帖最后由 weston 于 2023-1-6 15:57 编辑

kmod-mlx4-core/kmod-mlx5-core op上装下这个试试了

happysun110 发表于 2023-1-6 16:05

weston 发表于 2023-1-6 15:56
kmod-mlx4-core/kmod-mlx5-core op上装下这个试试了

安装了 kmod-mlx4-core,我找了很多地方都说只要安装这个就好了,但是我这里莫名其妙就是安装了也无法识别:

目前lspci命令可以看到这些网卡,硬件都识别了:


02:00.0 USB controller: VMware USB1.1 UHCI Controller
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
02:02.0 USB controller: VMware USB2 EHCI Controller
03:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2
04:00.0 Network controller: Mellanox Technologies MT27520 Family
0b:00.0 Ethernet controller: Aquantia Corp. AQC108 NBase-T/IEEE 802.3bz Ethernet Controller
13:00.0 Network controller: Mellanox Technologies MT27520 Family
1b:00.0 Network controller: Mellanox Technologies MT27520 Family

weston 发表于 2023-1-6 16:20

happysun110 发表于 2023-1-6 16:05
安装了 kmod-mlx4-core,我找了很多地方都说只要安装这个就好了,但是我这里莫名其妙就是安装了也无法识 ...

把kmod-mlx4-core卸载,装kmod-mlx5-core试试,两个还是有差异的

happysun110 发表于 2023-1-6 17:17

weston 发表于 2023-1-6 16:20
把kmod-mlx4-core卸载,装kmod-mlx5-core试试,两个还是有差异的

hp544+ 是 connectx-3 pro,应该用 kmod-mlx4-core 吧?

happysun110 发表于 2023-1-6 17:19

02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
03:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2
04:00.0 Network controller: Mellanox Technologies MT27520 Family
0b:00.0 Ethernet controller: Aquantia Corp. AQC108 NBase-T/IEEE 802.3bz Ethernet Controller
13:00.0 Network controller: Mellanox Technologies MT27520 Family
1b:00.0 Network controller: Mellanox Technologies MT27520 Family

看lspci的输出,其他网卡都是 Ethernet controller, hp544+ 是 Network controller,有没有可能是因为我的 hp544+ 工作在 lb 模式,而不是以太网模式?

tomatojack 发表于 2023-1-6 18:37

本帖最后由 tomatojack 于 2023-1-6 18:38 编辑

happysun110 发表于 2023-1-6 17:19
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
03:00.0...
这些信息是你在openwrt里看到吗?esxi就不能说明已经被openwrt识别
从这些信息看,硬件应该是识别好了,应该是配置问题
你可以用lspci -v或-vv看看详细信息,看看网卡的别名是什么
另外,为什么有三块以太网卡和三块插卡?你不是两个以太网加三块卡吗?

lion46 发表于 2023-1-6 19:19

建议看看固件是否支持这张网卡,我记得除了intel的网卡驱动是比较齐,其他网卡就算装了驱动也不一定可以使用

happysun110 发表于 2023-1-6 22:28

tomatojack 发表于 2023-1-6 18:37
这些信息是你在openwrt里看到吗?esxi就不能说明已经被openwrt识别
从这些信息看,硬件应该是识别好了,应 ...

这些都是ssh到 openwrt 下看到的,esxi 下 hp544+ 默认就带有驱动,直接可以用的。

happysun110 发表于 2023-1-6 22:29

tomatojack 发表于 2023-1-6 18:37
这些信息是你在openwrt里看到吗?esxi就不能说明已经被openwrt识别
从这些信息看,硬件应该是识别好了,应 ...

目前插了3块hp544+,还有一块aqc108 5千兆网卡(在 openwrt下同样无法驱动),另外主板板载一个千兆+2个万兆

fangl2002 发表于 2023-1-6 22:51

openWRT我只能衣来伸手饭来张口,看各位大神神仙交流。

tomatojack 发表于 2023-1-7 08:35

看起来还是出了一些问题,pci这边已经识别了硬件,但是系统并没有把它识别成可配置的以太网接口。
方法一是到system log/boot log里去查看错误信息再想办法看看能不能改
方法二直接自己定制固件,把你需要的驱动package包含进去,正常的话就可以识别成ethx了(避免出现有些package需要固件编译时打开一些选项,如果没有打开就无法工作)

deihc 发表于 2023-1-7 09:16

有没有可能是HP的网在联想的板子上有兼容问题呢
可以弄个WIN系统,看能不能正常驱动

happysun110 发表于 2023-1-13 11:27

更新:

换了一个自带mlx4-core的openwrt固件,就直接识别正常使用了。

https://www.right.com.cn/forum/thread-8267087-1-1.html

至于没有自带mlx4-core的固件,在手工安装 mlx4-core 之后不能适用的问题,我表示无能为力,浪费了很多时间。

惭愧。

goldgod 发表于 2023-5-26 07:08

happysun110 发表于 2023-1-6 15:12
我瞎玩的,主要是想搞40g内网。

主板:联想rx450d 拆机的 x99 双路主板,两个pcie16x + 4个 pcie8x 插槽 ...

你这功耗有多大?

happysun110 发表于 2023-5-26 10:14

goldgod 发表于 2023-5-26 07:08
你这功耗有多大?

100瓦出头,我也觉得有点大

后来还是换成功耗点一点的z87+e3 1265l了,只要60瓦。这台机器只提供千兆和2.5g网络,24小时开机。

40g网卡换到另外一台服务器上,按需开启。

goldgod 发表于 2023-5-26 22:05

happysun110 发表于 2023-5-26 10:14
100瓦出头,我也觉得有点大

后来还是换成功耗点一点的z87+e3 1265l了,只要60瓦。这台机器只提供千兆和2 ...

我认为家里用30w是个极限,我用的是10600T 其实现在想i3的10代低功耗足够了

happysun110 发表于 2023-5-27 11:51

goldgod 发表于 2023-5-26 22:05
我认为家里用30w是个极限,我用的是10600T 其实现在想i3的10代低功耗足够了

功耗大头不在cpu,我那台penwrt机器上有好几块2.5g网卡,万兆网卡,机械硬盘,ssd硬盘,兼职做pt和简单的nas共享。

把这些都拆掉也就35-40瓦。

aitkots 发表于 2023-5-31 22:32

是时候把op换成Debian12,再把Debian12手搓成一个路由器了,[偷笑] 稳定且方便扩展功能。

happysun110 发表于 2023-6-1 08:06

aitkots 发表于 2023-5-31 22:32
是时候把op换成Debian12,再把Debian12手搓成一个路由器了, 稳定且方便扩展功能。 ...

把Debian12手搓成一个路由器

这个很难吧?

不过op不支持 rdma,有点挫

aitkots 发表于 2023-6-1 22:49

happysun110 发表于 2023-6-1 08:06
把Debian12手搓成一个路由器

这个很难吧?


[傻笑] 第一次弄会觉得难,但是弄明白了原理,其实就不难了。。
https://gitee.com/callmer/linux_router_toss_notes

happysun110 发表于 2023-6-2 10:23

aitkots 发表于 2023-6-1 22:49
第一次弄会觉得难,但是弄明白了原理,其实就不难了。。
https://gitee.com/callmer/linux_router ...

我细细看了一边,因为之前有在 ubuntu server 20.04 上通过 netplan / network-manager 做 bridge 的经验,所以基本上看懂了,有些细节不是太明白但抄作业应该没问题。

遗憾的是可能会被 systemd 卡住:

- 由于使用了 systemd,因此本系列文章主要适用于支持 systemd 的 Linux 发行版。
- 由于受到 systemd 版本限制,各 Linux 发行版要求如下:Ubuntu Server 22.10

因为我用的是 HP544+ 网卡,这个是 connect3 pro,最后一个支持它的版本是 4.9 版本,仅限于 5.4 内核。因此我一直都是用 ubuntu 20.04.3 这个初始内核为5.4的版本。而 ubuntu 22.10默认是5.15内核,这导致 hp544+ 无法安装驱动,只能用系统自带的 4.0.0 en 驱动。
页: [1]
查看完整版本: [请教] openwrt下怎么给hp544+网卡安装驱动?