!899 [sync] PR-844: transfer pbuf timestamp in ip frag

From: @openeuler-sync-bot 
Reviewed-by: @jiangheng12 
Signed-off-by: @jiangheng12
This commit is contained in:
openeuler-ci-bot 2024-03-28 13:34:39 +00:00 committed by Gitee
commit 9f7d681236
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,48 @@
From 08db0069d623d35de69999ba1dfbc9ed1a5b78d6 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Thu, 14 Mar 2024 16:49:56 +0800
Subject: [PATCH] transfer pbuf timestamp in ip frag
---
src/core/ipv4/ip4_frag.c | 5 +++++
src/include/lwipsock.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/src/core/ipv4/ip4_frag.c b/src/core/ipv4/ip4_frag.c
index d9bf5cc..aa50856 100644
--- a/src/core/ipv4/ip4_frag.c
+++ b/src/core/ipv4/ip4_frag.c
@@ -39,6 +39,7 @@
*/
#include "lwip/opt.h"
+#include "lwipsock.h"
#if LWIP_IPV4
@@ -800,6 +801,10 @@ ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest)
if (rambuf == NULL) {
goto memerr;
}
+#if GAZELLE_ENABLE
+ /* transfer time stamp to new pbuf */
+ time_stamp_transfer_pbuf(p, rambuf);
+#endif
LWIP_ASSERT("this needs a pbuf in one piece!",
(rambuf->len == rambuf->tot_len) && (rambuf->next == NULL));
poff += pbuf_copy_partial(p, rambuf->payload, fragsize, poff);
diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h
index f4cb1de..dc2e9d3 100644
--- a/src/include/lwipsock.h
+++ b/src/include/lwipsock.h
@@ -182,6 +182,7 @@ extern err_t same_node_ring_create(struct rte_ring **ring, int size, int port, c
extern err_t create_same_node_ring(struct tcp_pcb *pcb);
extern err_t find_same_node_ring(struct tcp_pcb *pcb);
extern void lstack_calculate_aggregate(int type, uint32_t len);
+extern void time_stamp_transfer_pbuf(struct pbuf *pbuf_old, struct pbuf *pbuf_new);
#endif /* GAZELLE_ENABLE */
struct lwip_sock *get_socket(int s);
--
2.33.0

View File

@ -4,7 +4,7 @@
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
Name: lwip
Version: 2.2.0
Release: 8
Release: 9
License: BSD
URL: http://savannah.nongnu.org/projects/lwip/
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
@ -127,6 +127,7 @@ Patch9111: 0112-support-udp-pkglen-mtu-modify-netbuf_alloc-size.patch
Patch9112: 0113-fix-duplicate-pbuf_free-in-udp_sendto.patch
Patch9113: 0114-sync-recv-flags-with-linux-kernel.patch
Patch9114: 0115-enable-LWIP_SO_RCVTIMEO-to-support-recv-accept-timeo.patch
Patch9115: 0116-transfer-pbuf-timestamp-in-ip-frag.patch
BuildRequires: gcc-c++ dos2unix dpdk-devel
@ -156,6 +157,9 @@ cd %{_builddir}/%{name}-%{version}/src
%{_libdir}/liblwip.a
%changelog
* Mon Mar 18 2024 yangchen <yangchen145@huawei.com> - 2.2.0-9
- tansfer pbuf timestamp in ip frag
* Fri Mar 15 2024 liyunqing <liyunqing@kylinos.cn> - 2.2.0-8
- enable LWIP_SO_RCVTIMEO to support recv\accept timeout