add udp cksum in lwip
This commit is contained in:
parent
33501cce51
commit
6843c82bf7
42
0068-enable-UDP-CKSUM-in-lwip.patch
Normal file
42
0068-enable-UDP-CKSUM-in-lwip.patch
Normal file
@ -0,0 +1,42 @@
|
||||
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
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||
Name: lwip
|
||||
Version: 2.1.3
|
||||
Release: 72
|
||||
Release: 73
|
||||
License: BSD
|
||||
URL: http://savannah.nongnu.org/projects/lwip/
|
||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
||||
@ -79,6 +79,7 @@ Patch9063: 0064-fix-udp-send-recv-in-multiple-queue.patch
|
||||
Patch9064: 0065-fix-udp-recvmbox-size-not-set.patch
|
||||
Patch9065: 0066-adapt-to-dpdk-19.11-and-dpdk-21.11.patch
|
||||
Patch9066: 0067-fix-null-pointer-when-all-zero-address-listen.patch
|
||||
Patch9067: 0068-enable-UDP-CKSUM-in-lwip.patch
|
||||
|
||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||
|
||||
@ -109,6 +110,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
||||
%{_libdir}/liblwip.a
|
||||
|
||||
%changelog
|
||||
* Wed Jun 21 2023 kircher <majun65@huawei.com> - 2.1.3-73
|
||||
- enable udp cksum in lwip
|
||||
|
||||
* Thu Jun 15 2023 Lemmy Huang <huangliming5@huawei.com> - 2.1.3-72
|
||||
- fix null pointer when zero port listen
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user