1From afd0d39d31196a74d6808120d1ca5664825d477c Mon Sep 17 00:00:00 2001 2From: wuchangsheng <wuchangsheng2@huawei.com> 3Date: Mon, 6 Sep 2021 22:52:41 +0800 4Subject: [PATCH] aaa 5 6--- 7 src/api/sockets.c | 17 ----------------- 8 src/include/eventpoll.h | 1 - 9 src/include/lwipopts.h | 17 ----------------- 10 src/include/lwipsock.h | 5 ----- 11 4 files changed, 40 deletions(-) 12 13diff --git a/src/api/sockets.c b/src/api/sockets.c 14index ac4cccb..8719568 100644 15--- a/src/api/sockets.c 16+++ b/src/api/sockets.c 17@@ -755,10 +755,6 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) 18 sock = posix_api->get_socket(s); 19 /*AF_UNIX case*/ 20 if (!sock) { 21- if (rearm_accept_fd(s) < 0) { 22- LWIP_DEBUGF(SOCKETS_DEBUG, 23- ("failed to rearm accept fd=%d errno=%d\n", s, errno)); 24- } 25 return posix_api->accept_fn(s, addr, addrlen); 26 } 27 28@@ -769,11 +765,6 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen) 29 return -1; 30 } 31 32- if (rearm_accept_fd(s) < 0) { 33- LWIP_DEBUGF(SOCKETS_DEBUG, 34- ("failed to rearm accept fd=%d errno=%d\n", s, errno)); 35- } 36- 37 /* raise accept syscall in palce */ 38 newsock = posix_api->accept_fn(s, addr, addrlen); 39 if (newsock >= 0) { 40@@ -977,8 +968,6 @@ lwip_close(int s) 41 ret = posix_api->close_fn(s); 42 if ((ret < 0) && (errno == EINTR)) 43 ret = posix_api->close_fn(s); 44- if (posix_api->is_chld == 0) 45- clean_host_fd(s); 46 47 sock = posix_api->get_socket(s); 48 /*AF_UNIX case*/ 49@@ -1481,9 +1470,6 @@ static inline enum KERNEL_LWIP_PATH select_path(int s) 50 sock = posix_api->get_socket(s); 51 /*AF_UNIX case*/ 52 if (!sock) { 53- if (rearm_host_fd(s) < 0) { 54- LWIP_DEBUGF(SOCKETS_DEBUG, ("failed to rearm fd=%d errno=%d\n", s, errno)); 55- } 56 return PATH_KERNEL; 57 } 58 59@@ -1494,9 +1480,6 @@ static inline enum KERNEL_LWIP_PATH select_path(int s) 60 61 /*for AF_INET, we can try erther linux or lwip*/ 62 if (CONN_TYPE_IS_HOST(sock->conn)) { 63- if (rearm_host_fd(s) < 0) { 64- LWIP_DEBUGF(SOCKETS_DEBUG, ("failed to rearm read fd=%d errno=%d\n", s, errno)); 65- } 66 return PATH_KERNEL; 67 } 68 69diff --git a/src/include/eventpoll.h b/src/include/eventpoll.h 70index 01f8d64..f525bc2 100644 71--- a/src/include/eventpoll.h 72+++ b/src/include/eventpoll.h 73@@ -57,7 +57,6 @@ struct event_array { 74 75 struct libos_epoll { 76 struct event_queue *libos_queue; 77- struct event_array *host_queue; 78 int num_hostfds; 79 int hints; 80 int fd; /* self fd */ 81diff --git a/src/include/lwipopts.h b/src/include/lwipopts.h 82index 8893a5f..e0364a2 100644 83--- a/src/include/lwipopts.h 84+++ b/src/include/lwipopts.h 85@@ -177,23 +177,6 @@ 86 87 #define ARP_TABLE_SIZE 512 88 89-/* 90- --------------------------------------- 91- ------- Syscall thread options -------- 92- --------------------------------------- 93-*/ 94-#define USE_SYSCALL_THREAD 1 95- 96-#define MAX_BLOCKING_ACCEPT_FD (100) 97- 98-#define MAX_BLOCKING_CONNECT_FD (100) 99- 100-#define MAX_BLOCKING_EPOLL_FD (100) 101- 102-#define MAX_SYSCALL_EVENTS (MAX_BLOCKING_ACCEPT_FD + MAX_BLOCKING_CONNECT_FD + MAX_BLOCKING_EPOLL_FD) 103- 104-#define MAX_HOST_FD (MAX_CLIENTS + RESERVED_CLIENTS) 105- 106 #if USE_LIBOS 107 #define PER_THREAD __thread 108 #else 109diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h 110index dbc67b9..e9ffbb1 100644 111--- a/src/include/lwipsock.h 112+++ b/src/include/lwipsock.h 113@@ -146,10 +146,5 @@ void lwip_sock_init(void); 114 void lwip_exit(void); 115 116 extern int is_host_ipv4(uint32_t ipv4); 117-extern int rearm_host_fd(int fd); 118-extern int rearm_accept_fd(int fd); 119-extern void unarm_host_fd(int fd); 120-extern void clean_host_fd(int fd); 121-extern int arm_host_fd(struct libos_epoll *ep, int op, int fd, struct epoll_event *event); 122 123 #endif /* __LWIPSOCK_H__ */ 124-- 1252.23.0 126 127