From patchwork Fri Jun 23 11:44:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13290413 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 EA2FEC0015E for ; Fri, 23 Jun 2023 11:45:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 86F108D000F; Fri, 23 Jun 2023 07:45:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 81E298D0001; Fri, 23 Jun 2023 07:45:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6BF468D000F; Fri, 23 Jun 2023 07:45:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 5CA1A8D0001 for ; Fri, 23 Jun 2023 07:45:32 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 1C99C1A072E for ; Fri, 23 Jun 2023 11:45:32 +0000 (UTC) X-FDA: 80933832504.20.C9687B1 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf06.hostedemail.com (Postfix) with ESMTP id 5DC56180014 for ; Fri, 23 Jun 2023 11:45:30 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VdG8ckHv; spf=pass (imf06.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=1687520730; 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=xQVg0pnXVfTxPUpA8yd29SmocczyZN6S+xS0BIA8ljI=; b=uTnLcBgaw0s533KuaoabjqtO+uxvm5k+b5J86e0XeoByn2QTOAh439WE0dUyl8pT8KiY+Y DRtACjHab3gXiTUMc50gQdu8qF6YoqbWM+SeRzZswCIgLZq/apekPxQ7zUROfYvetQkFWi 679yUefyyNCvO9fqd7DnI19+BsoTYAs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687520730; a=rsa-sha256; cv=none; b=g7mnISPZFTcPXKYKKYEVd5uXrXJ2eEQEBrn3YMg5q/TB/QcbNnvYyniVcVH/4pIcNDpzv4 vtW4dcpNK44zbFPFk2GSnhANqmlwqJQr/aTI9XV2+arSQzqoRS043kTgj1xJu7L0HRxtMz NheRjy7yufxdVl86y7w0ZXKR8B9ZbFo= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=VdG8ckHv; spf=pass (imf06.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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687520729; 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=xQVg0pnXVfTxPUpA8yd29SmocczyZN6S+xS0BIA8ljI=; b=VdG8ckHvYVwC2JEh+I5lL61ZpOyYQ8bfsuZouP5H5UQViHN/l/5PZaCzXBpAvtHyeRarU8 H83PjEcKOGlU/MZTmDncsR7xb5/s1O8Xsg3Ob7+A+CWztyd/Woqd298rNqZF5Y/Y/xzjWH pa2+tu3tp5VYxh7rKMTp3xaVpu2tfG0= 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-648-Fm_QQgf9PJ2p0L6RUxDWNA-1; Fri, 23 Jun 2023 07:45:26 -0400 X-MC-Unique: Fm_QQgf9PJ2p0L6RUxDWNA-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 C0D988E44EF; Fri, 23 Jun 2023 11:45:24 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48F094087C6D; Fri, 23 Jun 2023 11:45:21 +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 v4 15/15] net: Kill MSG_SENDPAGE_NOTLAST Date: Fri, 23 Jun 2023 12:44:25 +0100 Message-ID: <20230623114425.2150536-16-dhowells@redhat.com> In-Reply-To: <20230623114425.2150536-1-dhowells@redhat.com> References: <20230623114425.2150536-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Rspamd-Queue-Id: 5DC56180014 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: x3fewagncj49rqeg38qmq16nhsjpju9b X-HE-Tag: 1687520730-972637 X-HE-Meta: U2FsdGVkX1+jlVuc06/lJat/qgsL6RiRxTSezXzXVk0PdQ4Ce+tuY0u7zFTGwVTZF3yLUfo6YCB3ABNuYe+mOgreydIIMyTHNdXFzerglLfv+lynu4d708jE5hiDX8BgcJvILaTFDivNSJxSMC/KyxOhzn8eRhqrafxjoYA+vdEiBY89SrSzdjKGrLOZiUh1/7vqq+NqwxTsj9U65JCOUpTyPIlzBhhLiVBL6DYaDjLsOIqdDnYQbRUP84yoMv8vZQS/h9nAVNqjnOelPZaJUnK663Vrl54q7WId0/SverRnYfhKmAJRUKmEFWNM1jqBOyQR9UHE1XiriCXWkU0k3goGpdHTC9Vqua3qGl9GHW+91krFaYh6xLvK/7vq179jDPnAKlz9XJWEtk5Whp6sOsf3ObhZf7U5K+5UKbNl/XJwRnZDaFSVlipEenblb1nRq3kkrpFq/kYJJ++ntKzhiYoCeMgUy7s2ww1krt6lIUnyYyLpVdOZKqm5rorcJHqNd4V7kBMBG0MV/QY5DZ9R2UouqklGV5IKmdvRlYq49zZXaeSin6BM0Dv1rYrq0Qfohh0qc0M6gNtSA7iEcNDEU8EsHBt4Rufmrz0EnYCr7XcdL/kgxIhMj7XcdIjQ3STxbUa8s9riEIr8dVwGPUxzcC+tyoXZzIzc7yYoPMfkb1S7Qi1p5yke8Ep75Q85aUpr74d3LLIQNzpjNwCN3fIrge/u/UTJsq6k9MzF1zYxNN4zjSDLWFN7K97yIweAiG6WjcaIHxmDmUGlBhBdCDFS0C8qrkfuS1iChcvuFWx4RifeidsmA019CMd6PrmDdU2S7E/cx7lGVn+lk8YakMHgRPmc4UeCEyBlEhq20CM0u+8b5V6x0TmNdRKClbAC5zd/r0MsuFdtifv7XicRclUuQCYENLHLv6Att4dF4zZGWijw7Z9P/MTss+uzndEk4bMComKTjlIIpen9i2cTwKI qdHfPn4r cuyHKy4IBtpS42xaN4ezvsBfYqR8lWus0uDDpc3KtxnjyLqBEtoUVNksETWWG0ZZJ91IrUCLFucXIKS4PbqHQm589aelA8FxAHKvvpTr0cfTrUVpkVNitUG2emvq4mD6xSr2XnBAr0AeSZXrWoiQmq2YU84S3915oFBlN20Z5J3Nd+vrK/bX17C/fnRQ2oeLjcHMwI1dn2AotQg5i0WnPM+EAMXihw+XeaUWchcSwvssHaMovLWhSX7aUQmnsAcoHHAlgSoPntj2Eqa2PZpKYOVOMKryQJ5OB6fDUSIjlyJPepNVSO4nLBzq77flnURu49IGYpgsCmH7FLHt18xJRXGsi+ECdPoqTh7PbdofpLpv3rfPyVxm8GddjIQsHH43mB0mcH5+OrntmSYXcCBj8MM6w6YMYNU9C3an/tyNf4qz0k76x/5N0QpYW1UbHyT/3Q+y9QRdKYqkrpdv2gEcAQptbfn5PZV3ILjJK+Rz32LC1r5s65Hy0ZD08exNBslPCajyfnfcTb4JJ1FduzmmTTLa+r80+ZVlV0dIp+s0HIIiJ01QxjQ4GqU9PJuQEw1YMc3ZX1nVZgowLltqdafsTKKxeKNTrmFECM9IS 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 | 5 +---- 6 files changed, 5 insertions(+), 12 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..5cdebd7ece7e 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 @@ -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