From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D207BC7EE24 for ; Wed, 31 May 2023 11:06:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235286AbjEaLGJ (ORCPT ); Wed, 31 May 2023 07:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232671AbjEaLGE (ORCPT ); Wed, 31 May 2023 07:06:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62A2AE4F for ; Wed, 31 May 2023 04:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685531072; 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=Bz65D2xx0gb4qdpRkIQI3YTwLtyS701r/8WE2ftqUAI=; b=PaneWmNamdT3Pqo9G6nuY6ysQTT8pZhnOCoIC/DIJlVOow/WqY9a/g2c3qhi6IZ5sPi0/E IQQdzsPIM8CRvtXHF82O7HHVQj3YxH2aLHzHGerlGfcFZig7I86L6AB8EWm2QpJ5TB/r4o yMgQVPmJ3VjQ/+aMLlDfj8m3sF95y54= 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-572-YLiSyU6kP3mOCadzX03i4g-1; Wed, 31 May 2023 07:04:29 -0400 X-MC-Unique: YLiSyU6kP3mOCadzX03i4g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 640EB1019C87; Wed, 31 May 2023 11:04:28 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A90CC154D7; Wed, 31 May 2023 11:04:25 +0000 (UTC) From: David Howells To: netdev@vger.kernel.org Cc: David Howells , Tom Herbert , Tom Herbert , Cong Wang , "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 v2 0/2] splice, net: Handle MSG_SPLICE_PAGES in AF_KCM Date: Wed, 31 May 2023 12:04:20 +0100 Message-ID: <20230531110423.643196-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here are patches to make AF_KCM handle the MSG_SPLICE_PAGES internal sendmsg flag. MSG_SPLICE_PAGES is an internal hint that tells the protocol that it should splice the pages supplied if it can. Its sendpage implementation is then turned into a wrapper around that. Does anyone actually use AF_KCM? Upstream it has some issues. It doesn't seem able to handle a "message" longer than 113920 bytes without jamming and doesn't handle the client termination once it is jammed. I've pushed the patches here also: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=sendpage-2-kcm David ver #2) - In kcm_sendpage(), only account the amount actually copied. - Wrap at 80 chars. Link: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=51c78a4d532efe9543a4df019ff405f05c6157f6 # part 1 Link: https://lore.kernel.org/r/20230524144923.3623536-1-dhowells@redhat.com/ # v1 David Howells (2): kcm: Support MSG_SPLICE_PAGES kcm: Convert kcm_sendpage() to use MSG_SPLICE_PAGES net/kcm/kcmsock.c | 218 ++++++++++++---------------------------------- 1 file changed, 58 insertions(+), 160 deletions(-)