sync macros with kernel defined which use in recv and send

(cherry picked from commit 76c0799259f9e959f0a021267143a0d49331c86d)
This commit is contained in:
liyunqing 2024-03-11 10:40:16 +08:00 committed by openeuler-sync-bot
parent 86fa418be2
commit d83954db0f
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,40 @@
From 931c9ff6d250685ce29cf10e3e03ecaae70419ea Mon Sep 17 00:00:00 2001
From: liyunqing <liyunqing@kylinos.cn>
Date: Tue, 27 Feb 2024 15:40:33 +0800
Subject: [PATCH] sync recv flags with linux kernel
---
src/include/lwip/sockets.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/include/lwip/sockets.h b/src/include/lwip/sockets.h
index 89b6eb5..4466f11 100644
--- a/src/include/lwip/sockets.h
+++ b/src/include/lwip/sockets.h
@@ -281,14 +281,22 @@ struct linger {
#define IPPROTO_UDPLITE 136
#define IPPROTO_RAW 255
+#if GAZELLE_ENABLE
/* Flags we can use with send and recv. */
+#define MSG_PEEK 0x02 /* Peeks at an incoming message */
+#define MSG_WAITALL 0x100 /* Unimplemented: Requests that the function block until the full amount of data requested can be returned */
+#define MSG_OOB 0x01 /* Unimplemented: Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific */
+#define MSG_DONTWAIT 0x40 /* Nonblocking i/o for this operation only */
+#define MSG_MORE 0x8000 /* Sender will send more */
+#define MSG_NOSIGNAL 0x4000 /* Uninmplemented: Requests not to send the SIGPIPE signal if an attempt to send is made on a stream-oriented socket that is no longer connected. */
+#else
#define MSG_PEEK 0x01 /* Peeks at an incoming message */
#define MSG_WAITALL 0x02 /* Unimplemented: Requests that the function block until the full amount of data requested can be returned */
#define MSG_OOB 0x04 /* Unimplemented: Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific */
#define MSG_DONTWAIT 0x08 /* Nonblocking i/o for this operation only */
#define MSG_MORE 0x10 /* Sender will send more */
#define MSG_NOSIGNAL 0x20 /* Uninmplemented: Requests not to send the SIGPIPE signal if an attempt to send is made on a stream-oriented socket that is no longer connected. */
-
+#endif /* GAZELLE_ENABLE */
/*
* Options for level IPPROTO_IP
--
2.27.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: 6
Release: 7
License: BSD
URL: http://savannah.nongnu.org/projects/lwip/
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
@ -125,6 +125,7 @@ Patch9109: 0110-adapt-lwip-2.2.0.patch
Patch9110: 0111-support-udp-pkglen-mtu-modify-IP_REASS_MAX_PBUFS.patch
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
BuildRequires: gcc-c++ dos2unix dpdk-devel
@ -154,6 +155,9 @@ cd %{_builddir}/%{name}-%{version}/src
%{_libdir}/liblwip.a
%changelog
* Mon Mar 11 2024 liyunqing <liyunqing@kylinos.cn> - 2.2.0-7
- sync macros with kernel defined which use in recv and send
* Thu Mar 7 2024 liyunqing <liyunqing@kylinos.cn> - 2.2.0-6
- fix duplicate pbuf_free in udp_sendto