11 Star 76 Fork 99

OpenHarmony / third_party_lwip

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
0068-enable-UDP-CKSUM-in-lwip.patch 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
Aurora 提交于 2023-12-07 03:26 . update lwip to 2.1.3-39.oe2203sp1
From 73d78d322ba8bb997d74c92727d1ec8b8640607f Mon Sep 17 00:00:00 2001
From: kircher <majun65@huawei.com>
Date: Wed, 21 Jun 2023 16:59:34 +0800
Subject: [PATCH] enable UDP CKSUM in lwip
---
src/include/dpdk_cksum.h | 1 +
src/include/lwipopts.h | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/src/include/dpdk_cksum.h b/src/include/dpdk_cksum.h
index b48c926..2c5b31e 100644
--- a/src/include/dpdk_cksum.h
+++ b/src/include/dpdk_cksum.h
@@ -87,6 +87,7 @@ static inline void tcph_cksum_set(struct pbuf *p, u16_t len) {
static inline void udph_cksum_set(struct pbuf *p, u16_t len) {
p->l4_len = len;
+ p->ol_flags |= RTE_MBUF_F_TX_UDP_CKSUM;
}
static inline u16_t ip_chksum_pseudo_offload(u8_t proto, u16_t proto_len,
diff --git a/src/include/lwipopts.h b/src/include/lwipopts.h
index f0df0e3..2ba1e4c 100644
--- a/src/include/lwipopts.h
+++ b/src/include/lwipopts.h
@@ -180,6 +180,12 @@
---------------------------------
*/
#define LWIP_UDP 1
+
+#define UDP_HLEN 8
+
+#define MEMP_NUM_UDP_PCB 16
+#define MEMP_NUM_IGMP_GROUP 16
+
#define DEFAULT_UDP_RECVMBOX_SIZE 4096
--
2.33.0
1
https://gitee.com/openharmony/third_party_lwip.git
git@gitee.com:openharmony/third_party_lwip.git
openharmony
third_party_lwip
third_party_lwip
master

搜索帮助