net: Kill MSG_SENDPAGE_NOTLAST
authorDavid Howells <dhowells@redhat.com>
Fri, 23 Jun 2023 22:55:13 +0000 (23:55 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 24 Jun 2023 22:50:13 +0000 (15:50 -0700)
Now that ->sendpage() has been removed, MSG_SENDPAGE_NOTLAST can be cleaned
up.  Things were converted to use MSG_MORE instead, but the protocol
sendpage stubs still convert MSG_SENDPAGE_NOTLAST to MSG_MORE, which is now
unnecessary.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jens Axboe <axboe@kernel.dk>
cc: Matthew Wilcox <willy@infradead.org>
cc: linux-afs@lists.infradead.org
cc: mptcp@lists.linux.dev
cc: rds-devel@oss.oracle.com
cc: tipc-discussion@lists.sourceforge.net
cc: virtualization@lists.linux-foundation.org
Link: https://lore.kernel.org/r/20230623225513.2732256-17-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/socket.h
net/tls/tls_device.c
net/tls/tls_main.c
net/tls/tls_sw.c
tools/perf/trace/beauty/include/linux/socket.h
tools/perf/trace/beauty/msg_flags.c

index 58204700018af7eb1b2893c8da7169fd2b4a0742..39b74d83c7c4a7e8f1434a8b2005f0d7d8d4904f 100644 (file)
@@ -319,7 +319,6 @@ struct ucred {
 #define MSG_MORE       0x8000  /* Sender will send more */
 #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */
 #define MSG_SENDPAGE_NOPOLICY 0x10000 /* sendpage() internal : do no apply policy */
-#define MSG_SENDPAGE_NOTLAST 0x20000 /* sendpage() internal : not the last page */
 #define MSG_BATCH      0x40000 /* sendmmsg(): more messages coming */
 #define MSG_EOF         MSG_FIN
 #define MSG_NO_SHARED_FRAGS 0x80000 /* sendpage() internal : page frags are not shared */
@@ -341,8 +340,7 @@ struct ucred {
 
 /* Flags to be cleared on entry by sendmsg and sendmmsg syscalls */
 #define MSG_INTERNAL_SENDMSG_FLAGS \
-       (MSG_SPLICE_PAGES | MSG_SENDPAGE_NOPOLICY | MSG_SENDPAGE_NOTLAST | \
-        MSG_SENDPAGE_DECRYPTED)
+       (MSG_SPLICE_PAGES | MSG_SENDPAGE_NOPOLICY | MSG_SENDPAGE_DECRYPTED)
 
 /* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
 #define SOL_IP         0
index 840ee06f17089bc40160e3a2f8405b20946af6d9..2021fe557e5030a420e08741f0408f25b9f8cb89 100644 (file)
@@ -441,8 +441,7 @@ static int tls_push_data(struct sock *sk,
        long timeo;
 
        if (flags &
-           ~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL | MSG_SENDPAGE_NOTLAST |
-             MSG_SPLICE_PAGES))
+           ~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL | MSG_SPLICE_PAGES))
                return -EOPNOTSUPP;
 
        if (unlikely(sk->sk_err))
index d5ed4d47b16e5f6f6b2c08f0a6e213fae970c90d..b6896126bb92245eb76a5a1747c92c24d9a58451 100644 (file)
@@ -127,7 +127,7 @@ int tls_push_sg(struct sock *sk,
 {
        struct bio_vec bvec;
        struct msghdr msg = {
-               .msg_flags = MSG_SENDPAGE_NOTLAST | MSG_SPLICE_PAGES | flags,
+               .msg_flags = MSG_SPLICE_PAGES | flags,
        };
        int ret = 0;
        struct page *p;
index 9b3aa89a42927974e5828e75d3fb39d76b00b662..53f944e6d8ef24edb0c91721de4b272ec5fccfcd 100644 (file)
@@ -1194,7 +1194,7 @@ int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
 
        if (msg->msg_flags & ~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL |
                               MSG_CMSG_COMPAT | MSG_SPLICE_PAGES |
-                              MSG_SENDPAGE_NOTLAST | MSG_SENDPAGE_NOPOLICY))
+                              MSG_SENDPAGE_NOPOLICY))
                return -EOPNOTSUPP;
 
        ret = mutex_lock_interruptible(&tls_ctx->tx_lock);
index 13c3a237b9c934a534aa4a8513fea5e34864528d..3bef212a24d776c2dd89f658f97d8103e17ca96c 100644 (file)
@@ -318,7 +318,6 @@ struct ucred {
 #define MSG_MORE       0x8000  /* Sender will send more */
 #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */
 #define MSG_SENDPAGE_NOPOLICY 0x10000 /* sendpage() internal : do no apply policy */
-#define MSG_SENDPAGE_NOTLAST 0x20000 /* sendpage() internal : not the last page */
 #define MSG_BATCH      0x40000 /* sendmmsg(): more messages coming */
 #define MSG_EOF         MSG_FIN
 #define MSG_NO_SHARED_FRAGS 0x80000 /* sendpage() internal : page frags are not shared */
index ea68db08b8e7195c46606381171a635582358a90..5cdebd7ece7e1cbe956bab4cb13b6645f24013e4 100644 (file)
@@ -8,9 +8,6 @@
 #ifndef MSG_WAITFORONE
 #define MSG_WAITFORONE            0x10000
 #endif
-#ifndef MSG_SENDPAGE_NOTLAST
-#define MSG_SENDPAGE_NOTLAST      0x20000
-#endif
 #ifndef MSG_FASTOPEN
 #define MSG_FASTOPEN           0x20000000
 #endif
@@ -50,7 +47,7 @@ static size_t syscall_arg__scnprintf_msg_flags(char *bf, size_t size,
        P_MSG_FLAG(NOSIGNAL);
        P_MSG_FLAG(MORE);
        P_MSG_FLAG(WAITFORONE);
-       P_MSG_FLAG(SENDPAGE_NOTLAST);
+       P_MSG_FLAG(SPLICE_PAGES);
        P_MSG_FLAG(FASTOPEN);
        P_MSG_FLAG(CMSG_CLOEXEC);
 #undef P_MSG_FLAG