17 Star 12 Fork 76

src-openEuler/dpdk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0036-require-at-least-two-segs-per-memseg-lists-in-map-pe.patch 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
From c766c3d12b1bb5e791cff3f34c733f18ce5cdd18 Mon Sep 17 00:00:00 2001
From: jiangheng <[email protected]>
Date: Thu, 9 May 2024 21:57:54 +0800
Subject: [PATCH] require at least two segs per memseg lists in map-perfect
mode
---
lib/eal/common/eal_common_dynmem.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_dynmem.c b/lib/eal/common/eal_common_dynmem.c
index 89e2acd..7f270a0 100644
--- a/lib/eal/common/eal_common_dynmem.c
+++ b/lib/eal/common/eal_common_dynmem.c
@@ -229,8 +229,14 @@ eal_dynmem_memseg_lists_init(void)
"n_segs:%i socket_id:%i hugepage_sz:%" PRIu64 "\n",
n_seglists, n_segs, socket_id, pagesz);
- if (internal_conf->map_perfect)
+ if (internal_conf->map_perfect) {
need_n_segs = eal_sec_get_num_pages(used_hp, pagesz, socket_id);
+ /*
+ * commit 51a5a72e2a (eal/linux: fix legacy mem init with many segments) require
+ * at least 2 segs per memseg list
+ */
+ need_n_segs = RTE_MAX(2, need_n_segs);
+ }
else
need_n_segs = n_segs;
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/dpdk.git
[email protected]:src-openeuler/dpdk.git
src-openeuler
dpdk
dpdk
master

搜索帮助