iqiyi / dpvs

DPVS is a high performance Layer-4 load balancer based on DPDK.
Other
3.04k stars 728 forks source link

patch failed #990

Closed opsarno closed 2 months ago

opsarno commented 3 months ago

我在 CentOS EL7, RockyLinux EL8 / EL9 打补丁都有失败提示啊,这样后面编译就过不去了。 不打补丁倒是能编译。 大家有遇到过吗?

0001-kni-use-netlink-event-for-multicast-driver-part.patch FAILED

[root@g1-aa-test-01 ~/down/dpvs-1.9.6/dpdk-stable-20.11.10]# patch -p1 < 0001-kni-use-netlink-event-for-multicast-driver-part.patch
patching file kernel/linux/kni/kni_net.c
Hunk #1 FAILED at 17.
Hunk #2 succeeded at 147 (offset 19 lines).
Hunk #3 succeeded at 691 (offset 33 lines).
Hunk #4 succeeded at 863 with fuzz 2 (offset 34 lines).
Hunk #5 succeeded at 895 (offset 34 lines).
1 out of 5 hunks FAILED -- saving rejects to file kernel/linux/kni/kni_net.c.rej

0006-bonding-fix-bonding-mode-4-problems.patch FAILED

[root@g1-aa-test-01 ~/down/dpvs-1.9.6/dpdk-stable-20.11.10]# patch -p1 < 0006-bonding-fix-bonding-mode-4-problems.patch
patching file drivers/net/bonding/rte_eth_bond_8023ad.c
Hunk #1 succeeded at 864 (offset 33 lines).
Hunk #2 succeeded at 935 (offset 33 lines).
Hunk #3 FAILED at 911.
1 out of 3 hunks FAILED -- saving rejects to file drivers/net/bonding/rte_eth_bond_8023ad.c.rej
patching file drivers/net/bonding/rte_eth_bond_pmd.c
Hunk #1 succeeded at 309 (offset 18 lines).
Hunk #2 succeeded at 339 (offset 18 lines).
Hunk #3 FAILED at 339.
Hunk #4 succeeded at 1296 (offset 17 lines).
1 out of 4 hunks FAILED -- saving rejects to file drivers/net/bonding/rte_eth_bond_pmd.c.rej

其它 patch 没有异常。

opsarno commented 2 months ago

已解决! dpdk 版本选错了, 不是 dpdk-stable-20.11.10 ,应该是 dpdk-stable-20.11.1

注:EL7 可编译通过, EL8 EL9 不行。

看了下 dpdk-stable-20.11.1/doc/guides/linux_gsg/sys_reqs.rst 中的说明,提到

 Compatibility for recent distribution kernels will be kept, notably RHEL/CentOS 7.

所以,对于当前 dpvs 使用 dpdk-stable-20.11.1 的情况下,还是用 CentOS 7 来编译安装吧。

opsarno commented 2 months ago

https://github.com/iqiyi/dpvs/issues/952

RockyLinux 8,确实可以编译通过,编辑 dpvs-1.9.6/src/Makefile 注释以下行

# CFLAGS += -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -mcmodel=medium