From e0e21a4170ef062cb66288beb6800a7c43da7136 Mon Sep 17 00:00:00 2001 From: wu-changsheng 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