!75 [sync] PR-72: 修复因报文重组变量未线程化引起的coredump

From: @openeuler-sync-bot 
Reviewed-by: @wu-changsheng 
Signed-off-by: @wu-changsheng
This commit is contained in:
openeuler-ci-bot 2022-10-06 10:05:15 +00:00 committed by Gitee
commit 2834f96b91
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From a554661e9dd189f2d4b5dee8970fd009db89d9aa Mon Sep 17 00:00:00 2001
From: wuchangsheng <wuchangsheng2@huawei.com>
Date: Thu, 6 Oct 2022 17:33:16 +0800
Subject: [PATCH] per thread reassdata variables
---
src/core/ipv4/ip4_frag.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/core/ipv4/ip4_frag.c b/src/core/ipv4/ip4_frag.c
index 17a4ccd..c60523d 100644
--- a/src/core/ipv4/ip4_frag.c
+++ b/src/core/ipv4/ip4_frag.c
@@ -115,8 +115,13 @@ PACK_STRUCT_END
IPH_ID(iphdrA) == IPH_ID(iphdrB)) ? 1 : 0
/* global variables */
+#if USE_LIBOS
+static PER_THREAD struct ip_reassdata *reassdatagrams;
+static PER_THREAD u16_t ip_reass_pbufcount;
+#else
static struct ip_reassdata *reassdatagrams;
static u16_t ip_reass_pbufcount;
+#endif
/* function prototypes */
static void ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev);
--
2.27.0

View File

@ -4,7 +4,7 @@
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
Name: lwip
Version: 2.1.3
Release: 15
Release: 16
License: BSD
URL: http://savannah.nongnu.org/projects/lwip/
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.tar.gz
@ -39,6 +39,7 @@ Patch9023: 0024-refactor-pkt-read-send-performance.patch
Patch9024: 0025-Replace-gettid-with-syscall-SYS_gettid.patch
Patch9025: 0026-del-redundant-wait_close-and-move-epoll_events-pos.patch
Patch9026: 0027-modify-EISCONN-condition.patch
Patch9027: 0028-per-thread-reassdata-variables.patch
BuildRequires: gcc-c++ dos2unix dpdk-devel
@ -67,6 +68,9 @@ cd %{_builddir}/%{name}-%{version}/src
%{_libdir}/liblwip.a
%changelog
* Thu Oct 6 2022 wuchangsheng<wuchangsheng2@huawei.com> - 2.1.3-16
- per thread reassdata variables
* Thu Oct 6 2022 wuchangsheng<wuchangsheng2@huawei.com> - 2.1.3-15
- modify EISCONN path condition
add in_send and send_flag value in sock