代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d6428e24a2024f8583d0747abb832fe73393f82b Mon Sep 17 00:00:00 2001
From: wu-changsheng <wuchangsheng2@huawei.com>
Date: Thu, 22 Dec 2022 23:15:38 +0800
Subject: [PATCH 2/4] mbuf-private-data-size-align-cache-line
---
src/common/dpdk_common.h | 4 ++--
src/lstack/core/lstack_dpdk.c | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/common/dpdk_common.h b/src/common/dpdk_common.h
index e4a447a..08ce4a1 100644
--- a/src/common/dpdk_common.h
+++ b/src/common/dpdk_common.h
@@ -25,8 +25,8 @@
#define PTR_TO_PRIVATE(mbuf) RTE_PTR_ADD(mbuf, sizeof(struct rte_mbuf))
/* Layout:
- * | rte_mbuf | gazelle_prive | custom_free_function | tcp_seg | payload |
- * | 128 | 16 | 56 | 32 |
+ * | rte_mbuf | gazelle_prive | pbuf_custom | tcp_seg | payload |
+ * | 128 | 16 | 64 | 32 |
* rte_prefetch0 in lwip project,tcp_out.c,tcp_output_segment use constants
**/
struct pbuf;
diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c
index 76ebe96..de87d48 100644
--- a/src/lstack/core/lstack_dpdk.c
+++ b/src/lstack/core/lstack_dpdk.c
@@ -144,8 +144,9 @@ static struct rte_mempool *create_pktmbuf_mempool(const char *name, uint32_t nb_
}
/* time stamp before pbuf_custom as priv_data */
- pool = rte_pktmbuf_pool_create(pool_name, nb_mbuf, mbuf_cache_size,
- sizeof(struct tcp_seg) + sizeof(struct pbuf_custom) + GAZELLE_MBUFF_PRIV_SIZE, MBUF_SZ, rte_socket_id());
+ uint16_t private_size = sizeof(struct tcp_seg) + sizeof(struct pbuf_custom) + GAZELLE_MBUFF_PRIV_SIZE;
+ private_size = RTE_ALIGN(private_size, RTE_CACHE_LINE_SIZE);
+ pool = rte_pktmbuf_pool_create(pool_name, nb_mbuf, mbuf_cache_size, private_size, MBUF_SZ, rte_socket_id());
if (pool == NULL) {
LSTACK_LOG(ERR, LSTACK, "cannot create %s pool rte_err=%d\n", pool_name, rte_errno);
}
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。