diff mbox series

Add MSG_SPLICE_PAGES from Linux 6.5 to bits/socket.h

Message ID 3fc787f2-1056-3595-23e3-623ae7b429cf@codesourcery.com
State New
Headers show
Series Add MSG_SPLICE_PAGES from Linux 6.5 to bits/socket.h | expand

Commit Message

Joseph Myers Oct. 13, 2023, 10:51 p.m. UTC
Linux 6.5 adds a constant MSG_SPLICE_PAGES.  Add this constant to
glibc's bits/socket.h.

Tested for x86_64.

Comments

Dmitry V. Levin Oct. 13, 2023, 11:39 p.m. UTC | #1
On Fri, Oct 13, 2023 at 10:51:09PM +0000, Joseph Myers wrote:
> Linux 6.5 adds a constant MSG_SPLICE_PAGES.  Add this constant to
> glibc's bits/socket.h.

It's an internal flag that's cleared on entering syscalls.
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index 57b05715be..73f62d02e9 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -247,6 +247,9 @@  enum
 #define MSG_BATCH	MSG_BATCH
     MSG_ZEROCOPY	= 0x4000000, /* Use user data in kernel path.  */
 #define MSG_ZEROCOPY	MSG_ZEROCOPY
+    MSG_SPLICE_PAGES	= 0x8000000, /* Splice the pages from the
+					iterator in sendmsg.  */
+#define MSG_SPLICE_PAGES	MSG_SPLICE_PAGES
     MSG_FASTOPEN	= 0x20000000, /* Send data in TCP SYN.  */
 #define MSG_FASTOPEN	MSG_FASTOPEN