28 lines
855 B
Diff
28 lines
855 B
Diff
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
|
|
|