From patchwork Wed May 24 14:49:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13254097 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 37FF1C77B73 for ; Wed, 24 May 2023 14:49:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC7BD900003; Wed, 24 May 2023 10:49:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B4FC3900002; Wed, 24 May 2023 10:49:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9F0CD900003; Wed, 24 May 2023 10:49:34 -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 8C99D900002 for ; Wed, 24 May 2023 10:49:34 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 62BA2409C8 for ; Wed, 24 May 2023 14:49:34 +0000 (UTC) X-FDA: 80825432268.06.A2902B8 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf05.hostedemail.com (Postfix) with ESMTP id 8F53910001C for ; Wed, 24 May 2023 14:49:32 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Pcn55Fwk; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf05.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684939772; a=rsa-sha256; cv=none; b=eKKnyHTVVM5Wc2HYgIAtVyOAEV2dQTnjp4ivb+6YfRzUk4/Xxf6CeFdEgEGuWftSqpXaeu CuK0lGL2L0P9ORflFF4lJtzdMBe3kJZdCiTLe4zozzJelwDfY1Ioc/sLSusdc/9FyH2R7X YJGxdd9/3s+B+2WNXU0WXxaCP5hG0NI= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Pcn55Fwk; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf05.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684939772; 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:references:dkim-signature; bh=6x0d7ICEdgzrcRTczgY+40SEU6mXT880gCShmbLBLHI=; b=UJTaeXDlhGoTDb7pt9blM5YMJvuO+wSRZH73pp//tmFcBb62PiavEaOyvbjGwqvOaUC93v nMvHlwKnOLRI4NPU4MtAG8kiauOjSDEqY8vozTyghfJQEMMzN2ZV3pRWSOoC8af68QFCfy kv6I0c5RSmqvFsLkBPfn++ycbA/1rQY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684939771; 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; bh=6x0d7ICEdgzrcRTczgY+40SEU6mXT880gCShmbLBLHI=; b=Pcn55Fwkph7evdm2C/Js6sT9yZYETMeTEUV4VL2ipBiaDvO/x1Jvz2fMuRIWIbCAkVrE+E 3K7m3DoUbypNJSan24CY9l8HVrZpoobfShyUD87SuyoYu27TScIP6jvRzLCRvswM+ct9QH 36zlJKz3UA84XXYJlsOgOhoAmCakYQw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-668-ZiIQyxGuNnic9eYKRn8upQ-1; Wed, 24 May 2023 10:49:28 -0400 X-MC-Unique: ZiIQyxGuNnic9eYKRn8upQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E9FFB3C397C6; Wed, 24 May 2023 14:49:27 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.39.192.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4FC9B1121314; Wed, 24 May 2023 14:49:26 +0000 (UTC) From: David Howells To: netdev@vger.kernel.org Cc: David Howells , "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 Subject: [PATCH net-next 0/4] splice, net: Replace sendpage with sendmsg(MSG_SPLICE_PAGES), part 2 Date: Wed, 24 May 2023 15:49:19 +0100 Message-Id: <20230524144923.3623536-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 8F53910001C X-Stat-Signature: eomqwjkwzyabpdabjhkfcbemj5t67icc X-HE-Tag: 1684939772-317924 X-HE-Meta: U2FsdGVkX19VXnPaOnQ9SKinbJyVxbtxfYId022if65XPYI1ibTvGtgqBEa3QcnOb07j2eij9p/Vus/xtbrVRS/wcfoQVaMxr+laHB5QeY1n+Ul6nw22n0OM54NzRu8W6Ep3HelS8j2ypC0FqEeWKUfZHoTbfgStVKDtegW9cIh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MIxCepHKhkNk77IBuZxUcF0PCpjRXPkeJJolYaaxVFYM68LsIVGqb/cuv7UafQperDI= 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: Here's the second tranche of patches towards providing a MSG_SPLICE_PAGES internal sendmsg flag that is intended to replace the ->sendpage() op with calls to sendmsg(). MSG_SPLICE_PAGES is a hint that tells the protocol that it should splice the pages supplied if it can and copy them if not. This set consists of the following parts: (1) Implement MSG_SPLICE_PAGES support in Chelsio TLS and make chtls_sendpage() just a wrapper around sendmsg(). (2) Implement MSG_SPLICE_PAGES support in AF_KCM and make kcm_sendpage() just a wrapper around sendmsg(). I've pushed the patches here also: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=sendpage-2 David Link: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=51c78a4d532efe9543a4df019ff405f05c6157f6 # part 1 David Howells (4): chelsio: Support MSG_SPLICE_PAGES chelsio: Convert chtls_sendpage() to use MSG_SPLICE_PAGES kcm: Support MSG_SPLICE_PAGES kcm: Convert kcm_sendpage() to use MSG_SPLICE_PAGES .../chelsio/inline_crypto/chtls/chtls_io.c | 121 ++-------- net/kcm/kcmsock.c | 216 +++++------------- 2 files changed, 74 insertions(+), 263 deletions(-)