Add MSG_SPLICE_PAGES from Linux 6.5 to bits/socket.h

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

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
redhat-pt-bot/TryBot-32bit success Build for i686
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed

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.
  

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