!66 modify path condition and add value for gazelle

From: @compile_success 
Reviewed-by: @wu-changsheng 
Signed-off-by: @wu-changsheng
This commit is contained in:
openeuler-ci-bot 2022-10-06 07:49:03 +00:00 committed by Gitee
commit e96e48bf23
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,24 @@
diff -Nur lwip-2.1.3-org/src/api/api_msg.c lwip-2.1.3/src/api/api_msg.c
--- lwip-2.1.3-org/src/api/api_msg.c 2022-09-21 14:18:31.456000000 +0000
+++ lwip-2.1.3/src/api/api_msg.c 2022-09-21 14:19:58.852000000 +0000
@@ -1417,7 +1417,7 @@
/* Prevent connect while doing any other action. */
if (msg->conn->state == NETCONN_CONNECT) {
err = ERR_ALREADY;
- } else if (msg->conn->state != NETCONN_NONE) {
+ } else if (msg->conn->pcb.tcp->state != ESTABLISHED) {
err = ERR_ISCONN;
} else {
setup_tcp(msg->conn);
diff -Nur lwip-2.1.3-org/src/include/lwipsock.h lwip-2.1.3/src/include/lwipsock.h
--- lwip-2.1.3-org/src/include/lwipsock.h 2022-09-21 14:18:31.440000000 +0000
+++ lwip-2.1.3/src/include/lwipsock.h 2022-09-21 14:22:30.404000000 +0000
@@ -98,6 +98,8 @@
struct list_node recv_list __rte_cache_aligned;
struct list_node event_list __rte_cache_aligned;
struct list_node send_list __rte_cache_aligned;
+ uint32_t in_send __rte_cache_aligned; /* avoid sock too much send rpc msg*/
+ uint32_t send_flag __rte_cache_aligned; /* avoid sock too much send rpc msg*/
uint32_t epoll_events; /* registered events, EPOLLONESHOT write frequently */
char pad __rte_cache_aligned;

View File

@ -4,7 +4,7 @@
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
Name: lwip
Version: 2.1.2
Release: 5
Release: 6
License: BSD
URL: http://savannah.nongnu.org/projects/lwip/
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
@ -39,6 +39,7 @@ Patch9022: 0022-notify-app-that-sock-state-changes-to-CLOSE_WAIT.patch
Patch9023: 0023-refactor-event-and-checksum-offload-support.patch
Patch9024: 0024-refactor-pkt-read-send-performance.patch
Patch9025: 0025-del-redundant-wait_close-and-move-epoll_events-pos.patch
Patch9026: 0026-modify-EISCONN-condition.patch
BuildRequires: gcc-c++ dos2unix dpdk-devel
@ -82,6 +83,7 @@ find %{_builddir}/%{name}-%{version} -type f -exec dos2unix -q {} \;
%patch9023 -p1
%patch9024 -p1
%patch9025 -p1
%patch9026 -p1
%build
cd %{_builddir}/%{name}-%{version}/src
@ -97,6 +99,10 @@ cd %{_builddir}/%{name}-%{version}/src
%{_libdir}/liblwip.a
%changelog
* Thu Sep 22 2022 zhujunhao<zhujunhao11@huawei.com> - 2.1.2-6
- modify EISCONN path condition
add in_send and send_flag value for gazelle
* Tue Jul 26 2022 wuchangsheng<wuchangsheng2@huawei.com> - 2.1.2-5
- del redundant wait_close in lwip_sock
move epoll_events into cache aligned area