!953 [sync] PR-947: CMAKE: fix ltran build error in 2403

From: @openeuler-sync-bot 
Reviewed-by: @jiangheng12 
Signed-off-by: @jiangheng12
This commit is contained in:
openeuler-ci-bot 2024-08-26 11:13:55 +00:00 committed by Gitee
commit 70f09a169a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 38 additions and 80 deletions

View File

@ -1,54 +0,0 @@
From 0f9d05d8fe6e58e199c0885a2808791aebd2bf08 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Sat, 4 Nov 2023 17:13:11 +0800
Subject: [PATCH] build: add mlx5 pmd dependency
---
src/lstack/Makefile | 2 ++
src/ltran/CMakeLists.txt | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/lstack/Makefile b/src/lstack/Makefile
index 30965f8..d5872bb 100644
--- a/src/lstack/Makefile
+++ b/src/lstack/Makefile
@@ -90,6 +90,7 @@ ifeq ($(DPDK_VERSION_1911), 1)
$(LIB_PATH)/librte_pmd_bond.so \
$(LIB_PATH)/librte_pmd_hinic.so \
$(LIB_PATH)/librte_pmd_ixgbe.so \
+ $(LIB_PATH)/librte_pmd_mlx5.so \
$(LIB_PATH)/librte_pmd_virtio.so
ifneq ($(ARCH), loongarch64)
LIBRTE_LIB += $(LIB_PATH)/librte_pmd_i40e.so
@@ -99,6 +100,7 @@ else
$(LIB_PATH)/librte_net_bond.so \
$(LIB_PATH)/librte_net_hinic.so \
$(LIB_PATH)/librte_net_ixgbe.so \
+ $(LIB_PATH)/librte_net_mlx5.so \
$(LIB_PATH)/librte_net_virtio.so \
$(LIB_PATH)/librte_telemetry.so \
$(LIB_PATH)/librte_pcapng.so
diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt
index e098a77..8f5f674 100644
--- a/src/ltran/CMakeLists.txt
+++ b/src/ltran/CMakeLists.txt
@@ -31,14 +31,14 @@ if($ENV{DPDK_VERSION_1911})
set(DPDK_DIR /usr/include/dpdk)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDPDK_VERSION_1911=1")
set(DPDK_LINK_FLAGS "-Wl,-lrte_pmd_bond -Wl,-lrte_pmd_hinic -Wl,-lrte_pmd_ixgbe \
- -Wl,-lrte_pmd_pcap -Wl,-lrte_pmd_virtio")
+ -Wl,-lrte_pmd_pcap -Wl,-lrte_pmd_virtio -Wl, -lrte_pmd_mlx5")
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "loongarch64")
set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lrte_pmd_i40e")
endif()
else()
set(DPDK_DIR /usr/local/include/)
set(DPDK_LINK_FLAGS "-Wl,-lrte_net_bond -Wl,-lrte_net_hinic -Wl,-lrte_net_ixgbe \
- -Wl,-lpcap -Wl,-lrte_net_pcap -Wl,-lrte_net_virtio -Wl,-lrte_pcapng -Wl,-lrte_telemetry")
+ -Wl,-lpcap -Wl,-lrte_net_pcap -Wl,-lrte_net_virtio -Wl,-lrte_net_mlx5 -Wl,-lrte_pcapng -Wl,-lrte_telemetry")
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "loongarch64")
set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lrte_net_i40e")
endif()
--
2.27.0

View File

@ -1,25 +0,0 @@
From 864192f1b7b7e128400e38585329453fb64a36fe Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
Date: Fri, 17 Nov 2023 17:22:37 +0800
Subject: [PATCH] build: fix ltran build error
---
src/ltran/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt
index 8f5f674..6dab9a9 100644
--- a/src/ltran/CMakeLists.txt
+++ b/src/ltran/CMakeLists.txt
@@ -31,7 +31,7 @@ if($ENV{DPDK_VERSION_1911})
set(DPDK_DIR /usr/include/dpdk)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDPDK_VERSION_1911=1")
set(DPDK_LINK_FLAGS "-Wl,-lrte_pmd_bond -Wl,-lrte_pmd_hinic -Wl,-lrte_pmd_ixgbe \
- -Wl,-lrte_pmd_pcap -Wl,-lrte_pmd_virtio -Wl, -lrte_pmd_mlx5")
+ -Wl,-lrte_pmd_pcap -Wl,-lrte_pmd_virtio -Wl,-lrte_pmd_mlx5")
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "loongarch64")
set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lrte_pmd_i40e")
endif()
--
2.27.0

View File

@ -0,0 +1,33 @@
From 0e6641552d16987b7e0706e1edb4992e7bd5e7d9 Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
Date: Mon, 26 Aug 2024 17:21:44 +0800
Subject: [PATCH] CMAKE: fix ltran build error in 2403
---
src/ltran/CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/ltran/CMakeLists.txt b/src/ltran/CMakeLists.txt
index 8e9b1ea..f94ed83 100644
--- a/src/ltran/CMakeLists.txt
+++ b/src/ltran/CMakeLists.txt
@@ -80,12 +80,12 @@ else()
endif()
if (DPDK_VERSION GREATER_EQUAL 23.11)
- set(DPDK_LINK_FLAGS ${DPDK_LINK_FLAGS} -lrte_log -larchive -Wl,-lrte_eal)
+ set(DPDK_LINK_FLAGS ${DPDK_LINK_FLAGS} -lrte_log -Wl,-lrte_eal)
else()
set(DPDK_LINK_FLAGS ${DPDK_LINK_FLAGS} -lrte_kni -Wl,-Bstatic -Wl,-lrte_eal -Wl,-Bdynamic)
- if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "ppc64le")
- set(DPDK_LINK_FLAGS ${DPDK_LINK_FLAGS} -Wl,-larchive)
- endif()
+endif()
+if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "ppc64le")
+ set(DPDK_LINK_FLAGS ${DPDK_LINK_FLAGS} -Wl,-larchive)
endif()
# compile info
--
2.34.1

View File

@ -2,7 +2,7 @@
Name: gazelle
Version: 1.0.2
Release: 56
Release: 57
Summary: gazelle is a high performance user-mode stack
License: MulanPSL-2.0
URL: https://gitee.com/openeuler/gazelle
@ -261,6 +261,7 @@ Patch9241: 0241-virtio-mod-virtio_user_name-when-multi-process-is-on.patch
Patch9242: 0242-fix-redis-coredump-ctrl-c-during-the-pressure-test.patch
Patch9243: 0243-virtio_user-check-netif-status.patch
Patch9244: 0244-virtio-solve-compilation-error-in-2003sp3.patch
Patch9245: 0245-CMAKE-fix-ltran-build-error-in-2403.patch
%description
%{name} is a high performance user-mode stack.
@ -302,6 +303,9 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b
%config(noreplace) %{conf_path}/ltran.conf
%changelog
* Mon Aug 26 2024 yinbin6 <yinbin8@huawei.com> - 1.0.2-57
- CMAKE: fix ltran build error in 2403
* Fri Aug 23 2024 yinbin6 <yinbin8@huawei.com> - 1.0.2-56
- virtio: solve compilation error in 2003sp3
- virtio_user: check netif status