sync fix dpdk_nic_is_xdp coredump in ltran mode

(cherry picked from commit 96d4515aa1372b89ecafed66af1a90dc671168a8)
This commit is contained in:
jiangheng 2024-10-10 18:10:42 +08:00 committed by openeuler-sync-bot
parent 87109725bb
commit 623fa86126
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From ba4115c3e56f32fb5186cd178b36974367723df9 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
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

View File

@ -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 <jiangheng14@huawei.com> - 1.0.2-69
- fix dpdk_nic_is_xdp coredump in ltran mode
* Thu Oct 10 2024 yinbin6 <jiangheng14@huawei.com> - 1.0.2-68
- xdp: skip checksum temporarily due to kernel cannot transfer offloads