1 Star 0 Fork 32

吴昌盛/gazelle-tar

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0079-fix-miss-send-rpc-msg-err.patch 2.17 KB
一键复制 编辑 原始数据 按行查看 历史
吴昌盛 提交于 2022-09-05 15:52 . backport bugifx and doc
From e0e21a4170ef062cb66288beb6800a7c43da7136 Mon Sep 17 00:00:00 2001
From: wu-changsheng <wuchangsheng2@huawei.com>
Date: Mon, 29 Aug 2022 16:54:20 +0800
Subject: [PATCH 15/20] fix miss send rpc msg err
---
src/lstack/core/lstack_lwip.c | 1 -
src/lstack/core/lstack_thread_rpc.c | 5 -----
src/lstack/include/lstack_protocol_stack.h | 1 -
3 files changed, 7 deletions(-)
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index 96c6c96..35b67f5 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -321,7 +321,6 @@ void stack_send(struct rpc_msg *msg)
int32_t flags = msg->args[MSG_ARG_2].i;
struct protocol_stack *stack = get_protocol_stack();
- __atomic_store_n(&stack->in_send, false, __ATOMIC_RELEASE);
struct lwip_sock *sock = get_socket(fd);
if (sock == NULL) {
diff --git a/src/lstack/core/lstack_thread_rpc.c b/src/lstack/core/lstack_thread_rpc.c
index d0f5257..a6e9725 100644
--- a/src/lstack/core/lstack_thread_rpc.c
+++ b/src/lstack/core/lstack_thread_rpc.c
@@ -429,11 +429,7 @@ int32_t rpc_call_ioctl(int fd, long cmd, void *argp)
void rpc_call_send(int fd, const void *buf, size_t len, int flags)
{
- /* same stack don't repeat send msg */
struct protocol_stack *stack = get_protocol_stack_by_fd(fd);
- if (__atomic_load_n(&stack->in_send, __ATOMIC_ACQUIRE)) {
- return;
- }
struct rpc_msg *msg = rpc_msg_alloc(stack, stack_send);
if (msg == NULL) {
@@ -445,7 +441,6 @@ void rpc_call_send(int fd, const void *buf, size_t len, int flags)
msg->args[MSG_ARG_2].i = flags;
msg->self_release = 0;
- stack->in_send = true;
rpc_call(&stack->rpc_queue, msg);
}
diff --git a/src/lstack/include/lstack_protocol_stack.h b/src/lstack/include/lstack_protocol_stack.h
index 2a6aec7..36340ab 100644
--- a/src/lstack/include/lstack_protocol_stack.h
+++ b/src/lstack/include/lstack_protocol_stack.h
@@ -50,7 +50,6 @@ struct protocol_stack {
struct reg_ring_msg *reg_buf;
volatile bool low_power;
- volatile bool in_send __rte_cache_aligned;
lockless_queue rpc_queue __rte_cache_aligned;
char pad __rte_cache_aligned;
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wu-changsheng/gazelle-tar.git
git@gitee.com:wu-changsheng/gazelle-tar.git
wu-changsheng
gazelle-tar
gazelle-tar
master

搜索帮助