• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From b8c388a7adef4dc53d3bb135102da64bf8a08b76 Mon Sep 17 00:00:00 2001
2From: wuchangsheng <wuchangsheng2@huawei.com>
3Date: Thu, 6 Oct 2022 15:57:33 +0800
4Subject: [PATCH] modify-EISCONN-condition
5
6---
7 src/api/api_msg.c      | 2 +-
8 src/include/lwipsock.h | 2 ++
9 2 files changed, 3 insertions(+), 1 deletion(-)
10
11diff --git a/src/api/api_msg.c b/src/api/api_msg.c
12index 7839526..2dded75 100644
13--- a/src/api/api_msg.c
14+++ b/src/api/api_msg.c
15@@ -1417,7 +1417,7 @@ lwip_netconn_do_connect(void *m)
16         /* Prevent connect while doing any other action. */
17         if (msg->conn->state == NETCONN_CONNECT) {
18           err = ERR_ALREADY;
19-        } else if (msg->conn->state != NETCONN_NONE) {
20+        } else if (msg->conn->pcb.tcp->state != ESTABLISHED) {
21           err = ERR_ISCONN;
22         } else {
23           setup_tcp(msg->conn);
24diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h
25index 16e0dd3..3c5c44b 100644
26--- a/src/include/lwipsock.h
27+++ b/src/include/lwipsock.h
28@@ -98,6 +98,8 @@ struct lwip_sock {
29   struct list_node recv_list __rte_cache_aligned;
30   struct list_node event_list __rte_cache_aligned;
31   struct list_node send_list __rte_cache_aligned;
32+  uint32_t in_send __rte_cache_aligned; /* avoid sock too much send rpc msg*/
33+  uint32_t send_flag __rte_cache_aligned; /* avoid sock too much send rpc msg*/
34   uint32_t epoll_events; /* registered events, EPOLLONESHOT write frequently */
35   char pad __rte_cache_aligned;
36
37--
382.27.0
39
40