1 Star 0 Fork 48

yinbin6/lwip

forked from src-openEuler/lwip 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0116-transfer-pbuf-timestamp-in-ip-frag.patch 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
yc555 提交于 2024-03-14 12:36 . transfer pbuf timestamp in ip frag
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yinbin6/lwip.git
git@gitee.com:yinbin6/lwip.git
yinbin6
lwip
lwip
master

搜索帮助