From patchwork Tue Jun 20 14:53:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13286021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74ACDEB64DB for ; Tue, 20 Jun 2023 14:58:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 15BEC8D0006; Tue, 20 Jun 2023 10:58:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 10D0F8D0001; Tue, 20 Jun 2023 10:58:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EF0738D0006; Tue, 20 Jun 2023 10:58:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id DDD148D0001 for ; Tue, 20 Jun 2023 10:58:12 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id B299A1211B8 for ; Tue, 20 Jun 2023 14:58:12 +0000 (UTC) X-FDA: 80923431624.05.5643A91 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf18.hostedemail.com (Postfix) with ESMTP id D90671C0013 for ; Tue, 20 Jun 2023 14:58:09 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=NLlktuRX; spf=pass (imf18.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687273089; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=096kfvQCNbO3jjvPJlb61wpL4gpNse4m8jbz5dQcH+U=; b=RmriIdl/rbOljO6qeukt0ZkdxBDQOlR73WfHl+czHuEOC2GP8RtU9eL1JJDVIdMwgmFkkR JjXBbw9kEXb6q1ERxe3usSNjXVwDlqJ0b6RGIzzawRmLcEtA8UFDNEIil2P7pvx3b/1WBw kh+LD/wA48yWLuFiTj4zXH3nD4sgkpE= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=NLlktuRX; spf=pass (imf18.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687273089; a=rsa-sha256; cv=none; b=b45HGPev25/ivlYqlz6GXk377hiY7HLEcAp4/Im4N1lRmyoyc34TVuRd91fKBEKLItadhq gWGzZ5UYmY1OeDgh5a2gw/GIsQFxYPHjWOKw6aX8TwcNjcswe+AWdzGA7BX1DrhfXEJsuR K1cNVzHKBB9M02iU5sOqTYpo1DKUpYQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687273089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=096kfvQCNbO3jjvPJlb61wpL4gpNse4m8jbz5dQcH+U=; b=NLlktuRXYst77c5i95xqGRYVxnBScqks2uhsnBPnfT50M3wKth80NqcUCDQHDnqu0h7gDY AO94U3AdF5Hsc8yGTxLAllSVG+9kZ1uUCowcYltlmzC2hKBDYFkEBVQm3yGUuz+hvVNRTI rH4d+VaalQeuqpDIuTOSpieAEpFQuVs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-246-cetdja7_MNaYUIl_PdTHIQ-1; Tue, 20 Jun 2023 10:58:01 -0400 X-MC-Unique: cetdja7_MNaYUIl_PdTHIQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D63E710665CD; Tue, 20 Jun 2023 14:54:49 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id D321E40C6CD2; Tue, 20 Jun 2023 14:54:46 +0000 (UTC) From: David Howells To: netdev@vger.kernel.org Cc: David Howells , Alexander Duyck , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , David Ahern , Matthew Wilcox , Jens Axboe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, dccp@vger.kernel.org, linux-afs@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-can@vger.kernel.org, linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org, linux-hams@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-rdma@vger.kernel.org, linux-sctp@vger.kernel.org, linux-wpan@vger.kernel.org, linux-x25@vger.kernel.org, mptcp@lists.linux.dev, rds-devel@oss.oracle.com, tipc-discussion@lists.sourceforge.net, virtualization@lists.linux-foundation.org Subject: [PATCH net-next v3 18/18] net: Kill MSG_SENDPAGE_NOTLAST Date: Tue, 20 Jun 2023 15:53:37 +0100 Message-ID: <20230620145338.1300897-19-dhowells@redhat.com> In-Reply-To: <20230620145338.1300897-1-dhowells@redhat.com> References: <20230620145338.1300897-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Rspamd-Queue-Id: D90671C0013 X-Rspam-User: X-Stat-Signature: te7pz1ti4sq1sopc1az7uucij98poy5d X-Rspamd-Server: rspam01 X-HE-Tag: 1687273089-6202 X-HE-Meta: U2FsdGVkX1+dRnDFkcGTPKU9OQVriI3MkIWo7LFLZ1r/l/EF9XI2Z4rGD2zwEnx2RWr+xuSofRQHXbvhcw+dgD0vQJzHngiZ+RdY5avTk+2F+f9k+Z6kcdBjWqyy5iDHZMwc5XkmwqQhA+iYmHRG4dTWEUF7uTojJvDE/SiuawmpOvvNlcH8HThCP4V/u+ZJ/MAU1aRyL1QFZa9oNq1b6kU2vCbPPlgYz5V4usJLzcL5GNdLifZbQnPRhIoT9PDH4iL/jLPWDqSD0Gk+NwukNduf0GvNSok4BNctb1cIg4iA7v45kjnny4/fhynADj2PE+C6P98rgWeHgiL54tBZFtMwspvFABaWk61Sci5fq/sHAfg6riakNTPj32G0gwGZ9yWO2V5XzcUZv7z0hd6DnAg19Du1R4t48ihSGe9VP6VyH2i5WKLkTXYDe/sxM2H/cNAyjIHtt5e4u+yCn8rWs8vRHzXhuUh1ofqHrWtPLSRhL+dHIdk9hi0z4AQYBgh3nU4KgO6gTm7xtVT8dSdgj1DJ7U/IrPel4HG+fEkUQI/B8FAz9Kw+1XEAygOIT9wAwGTRHo/hrtwMS9BOzHAw+9jwU6dAxttDZWSiMhJt0GsAGMcioOcRFCTbqjVYS3PR95/sh0hAnVFHfIdz7TEhcHLWvczrVME/7D5ShXUnvic6+Cn+SBQT5D64Q3+O9XeClFAm9yzCDiEWFpDAcclUN4IOzVH0gV5CpfG2VRtWiEcnRAY4xPbN9byn/141lyGDE7YZ+K/nygxJbN/gnsGJSQWQZ3b0RZ6VHPi2+F40DYOXHzey1o4TP5qKihwWJT+O2l8wDuA+AjVVadY42tgzYRN7s4b5YXavXLrWgaNG8TR/ArwDVymfeVqJx687N3++UT+nloBnlAeS5o7woq7Vc41kzbliijbKngAzT7f4m0vvTlbPgXw3H0uNQvpsWQApll9U5H177YaI0e2q5jo lt7UM03q f1zbUnyB9oyaUqQfIGs9zh8YFHuUbD1h5TLQLuL2ibHBnF1uJufmsUwuLPzgQRLPSs8Y+PgD1DhTKFbg3HxAWrUwqKwKbHBCfU0ANhgbDc6JC6xCR2wvg496ENZ+9RTR2zi33RZUuaWxvQAnsw1hsx/+Vviggmf4g8bujVQMVFcq3pWK31joQxJKNBB0JiPq7IF0S4jxRWV41/tJdU7Upx+ttLh8BrglDWhVsYyUIHReySnz8RZUe47nEW8mS1+CmHeqUvHS7yEwVau1ofNJdgGpWFGROEwCqpLdkasGdnl2e43ZPKM4gCyc++1v5G9L8oVwP/ltwM7K3xn8cZM7slX+MEiTwAQr3TymiFChJr0FSpiFCNSBc6f4QmxRXglHmEpmNZqiMBzXnaJR6ddolchitEfByIYjw9kWn5zglKeE3uKLvV433r2yMCbCkRIokoaSpzsBppuJbXCyB/5AB/u81uhUoAWkjSy40loVwNEpOYUwZrxjgBkvFf51x64VDdAyMD4f5ya+WdBhbmTTaSKoCwGSe7q0IIys/rDWQqCZvtGTXhe4Uw6uehpiy1Q/+2bKjlFnAyCngMTpAnZH6io4TXK4WEn496m8O X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: Jens Axboe cc: Matthew Wilcox cc: bpf@vger.kernel.org cc: dccp@vger.kernel.org cc: linux-afs@lists.infradead.org cc: linux-arm-msm@vger.kernel.org cc: linux-can@vger.kernel.org cc: linux-crypto@vger.kernel.org cc: linux-doc@vger.kernel.org cc: linux-hams@vger.kernel.org cc: linux-perf-users@vger.kernel.org cc: linux-rdma@vger.kernel.org cc: linux-sctp@vger.kernel.org cc: linux-wpan@vger.kernel.org cc: linux-x25@vger.kernel.org cc: mptcp@lists.linux.dev cc: netdev@vger.kernel.org cc: rds-devel@oss.oracle.com cc: tipc-discussion@lists.sourceforge.net cc: virtualization@lists.linux-foundation.org --- Notes: ver #3) - tcp_bpf is now handled by an earlier patch. include/linux/socket.h | 4 +--- net/tls/tls_device.c | 3 +-- net/tls/tls_main.c | 2 +- net/tls/tls_sw.c | 2 +- tools/perf/trace/beauty/include/linux/socket.h | 1 - tools/perf/trace/beauty/msg_flags.c | 3 --- 6 files changed, 4 insertions(+), 11 deletions(-) diff --git a/include/linux/socket.h b/include/linux/socket.h index 58204700018a..39b74d83c7c4 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -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 diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index 840ee06f1708..2021fe557e50 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -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)) diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index d5ed4d47b16e..b6896126bb92 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -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; diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 9b3aa89a4292..53f944e6d8ef 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -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); diff --git a/tools/perf/trace/beauty/include/linux/socket.h b/tools/perf/trace/beauty/include/linux/socket.h index 13c3a237b9c9..3bef212a24d7 100644 --- a/tools/perf/trace/beauty/include/linux/socket.h +++ b/tools/perf/trace/beauty/include/linux/socket.h @@ -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 */ diff --git a/tools/perf/trace/beauty/msg_flags.c b/tools/perf/trace/beauty/msg_flags.c index ea68db08b8e7..b5b580e5a77e 100644 --- a/tools/perf/trace/beauty/msg_flags.c +++ b/tools/perf/trace/beauty/msg_flags.c @@ -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