代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 4b7dd71bd8ab1023b73b2c157719d6a939d75b49 Mon Sep 17 00:00:00 2001
From: wu-changsheng <wuchangsheng2@huawei.com>
Date: Sun, 18 Dec 2022 19:36:52 +0800
Subject: [PATCH 2/2] rpc-dont-send
---
src/common/dpdk_common.h | 4 +++-
src/lstack/core/lstack_lwip.c | 12 +-----------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/common/dpdk_common.h b/src/common/dpdk_common.h
index a0c304c..63d651d 100644
--- a/src/common/dpdk_common.h
+++ b/src/common/dpdk_common.h
@@ -25,7 +25,9 @@
#define PTR_TO_PRIVATE(mbuf) RTE_PTR_ADD(mbuf, sizeof(struct rte_mbuf))
/* Layout:
- * | rte_mbuf | pbuf | custom_free_function | tcp_seg | payload |
+ * | rte_mbuf | gazelle_prive | pbuf | custom_free_function | tcp_seg | payload |
+ * rte_prefetch0 in lwip project,tcp_out.c,tcp_output_segment use constants
+ sizeof(struct rte_mbuf) + GAZELLE_MBUFF_PRIV_SIZE = 128 + 16
**/
struct pbuf;
static inline struct rte_mbuf *pbuf_to_mbuf(struct pbuf *p)
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index c04ed27..ae6c98d 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -573,7 +573,6 @@ static inline bool do_lwip_send(struct protocol_stack *stack, int32_t fd, struct
void stack_send(struct rpc_msg *msg)
{
int32_t fd = msg->args[MSG_ARG_0].i;
- int32_t flags = msg->args[MSG_ARG_2].i;
struct protocol_stack *stack = (struct protocol_stack *)msg->args[MSG_ARG_3].p;
struct lwip_sock *sock = get_socket(fd);
@@ -583,22 +582,13 @@ void stack_send(struct rpc_msg *msg)
}
__atomic_store_n(&sock->in_send, 0, __ATOMIC_RELEASE);
- rte_mb();
-
- if (!NETCONN_IS_DATAOUT(sock) || sock->errevent > 0) {
- return;
- }
-
- bool replenish_again = do_lwip_send(stack, fd, sock, flags);
/* have remain data or replenish again add sendlist */
- if (NETCONN_IS_DATAOUT(sock) || replenish_again) {
+ if (sock->errevent == 0 && NETCONN_IS_DATAOUT(sock)) {
if (list_is_null(&sock->send_list)) {
list_add_node(&stack->send_list, &sock->send_list);
__atomic_store_n(&sock->in_send, 1, __ATOMIC_RELEASE);
}
-
- stack->stats.send_self_rpc++;
}
}
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。