From 623fa8612649e59d411392db46196bf8b59ffd6f Mon Sep 17 00:00:00 2001 From: jiangheng Date: Thu, 10 Oct 2024 18:10:42 +0800 Subject: [PATCH] sync fix dpdk_nic_is_xdp coredump in ltran mode (cherry picked from commit 96d4515aa1372b89ecafed66af1a90dc671168a8) --- ...dk_nic_is_xdp-coredump-in-ltran-mode.patch | 27 +++++++++++++++++++ gazelle.spec | 6 ++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 0270-fix-dpdk_nic_is_xdp-coredump-in-ltran-mode.patch diff --git a/0270-fix-dpdk_nic_is_xdp-coredump-in-ltran-mode.patch b/0270-fix-dpdk_nic_is_xdp-coredump-in-ltran-mode.patch new file mode 100644 index 0000000..1cea7d6 --- /dev/null +++ b/0270-fix-dpdk_nic_is_xdp-coredump-in-ltran-mode.patch @@ -0,0 +1,27 @@ +From ba4115c3e56f32fb5186cd178b36974367723df9 Mon Sep 17 00:00:00 2001 +From: jiangheng +Date: Thu, 10 Oct 2024 17:55:53 +0800 +Subject: [PATCH] fix dpdk_nic_is_xdp coredump in ltran mode + +--- + src/lstack/core/lstack_dpdk.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c +index 33605b3..9294c5b 100644 +--- a/src/lstack/core/lstack_dpdk.c ++++ b/src/lstack/core/lstack_dpdk.c +@@ -417,6 +417,10 @@ static int eth_params_rss(struct rte_eth_conf *conf, struct rte_eth_dev_info *de + bool dpdk_nic_is_xdp(void) + { + struct protocol_stack_group *stack_group = get_protocol_stack_group(); ++ /* eth_params is null in ltran mode */ ++ if (stack_group->eth_params == NULL) { ++ return false; ++ } + return stack_group->eth_params->is_xdp; + } + +-- +2.33.0 + diff --git a/gazelle.spec b/gazelle.spec index c82218b..91f70b5 100644 --- a/gazelle.spec +++ b/gazelle.spec @@ -2,7 +2,7 @@ Name: gazelle Version: 1.0.2 -Release: 68 +Release: 69 Summary: gazelle is a high performance user-mode stack License: MulanPSL-2.0 URL: https://gitee.com/openeuler/gazelle @@ -286,6 +286,7 @@ Patch9266: 0266-rtw-fix-send-length-exceeding-send_ring_size.patch Patch9267: 0267-rpc-fix-rpc_sync_call-spinlock-block-when-msg-be-rec.patch Patch9268: 0268-bugfix-fix-gazelle-init-failed-while-setup-by-non-ro.patch Patch9269: 0269-xdp-skip-checksum-temporarily-due-to-kernel-cannot-t.patch +Patch9270: 0270-fix-dpdk_nic_is_xdp-coredump-in-ltran-mode.patch %description %{name} is a high performance user-mode stack. @@ -327,6 +328,9 @@ install -Dpm 0640 %{_builddir}/%{name}-%{version}/src/ltran/ltran.conf %{b %config(noreplace) %{conf_path}/ltran.conf %changelog +* Thu Oct 10 2024 yinbin6 - 1.0.2-69 +- fix dpdk_nic_is_xdp coredump in ltran mode + * Thu Oct 10 2024 yinbin6 - 1.0.2-68 - xdp: skip checksum temporarily due to kernel cannot transfer offloads