1 Star 0 Fork 48

flying-eagle/lwip

forked from src-openEuler/lwip 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0068-enable-UDP-CKSUM-in-lwip.patch 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
jinag12 提交于 2024-02-06 10:45 . adapt lwip-2.2.0
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 1c27051..f44b541 100644
--- a/src/include/lwipopts.h
+++ b/src/include/lwipopts.h
@@ -174,6 +174,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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/flying-eagle12138/lwip.git
git@gitee.com:flying-eagle12138/lwip.git
flying-eagle12138
lwip
lwip
master

搜索帮助