From patchwork Thu Jul 20 21:42:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arseniy Krasnov X-Patchwork-Id: 12365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp3410762vqt; Thu, 20 Jul 2023 15:18:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlENXMGw8DI0HGjS4Eo1wCCHPGomIeD1MDSzOpV4f116uXQ6Ry4ZUlOCaSQKfKfnDvS8mt5l X-Received: by 2002:a17:90a:7282:b0:262:f798:b60d with SMTP id e2-20020a17090a728200b00262f798b60dmr34405pjg.6.1689891483290; Thu, 20 Jul 2023 15:18:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689891483; cv=none; d=google.com; s=arc-20160816; b=EPiXtZUYpibpVMIiPPhEIZfQ0HVO1kjcc3A5GnXaq5lgBuiHiW+3Xrn9SKdy9tYeqM S7OfuKZXca/BpPc8EWEgaAOQW+vfm1ovdu+VFFo+p0fB0XFvvnauAEcK3G3FJW1BvkDo MZRQHmU2ornRBCm4Wz0RnvUQlEletk7fKOnNdQj4Y0SVVQAR1h7gAkkQ6ki260kIP74J 43t0j9hhZNc97hUTFYb/OL9b59ZX5xB5JjWffSryHIJH7j/M0a/FkvFhW/rJ/FCDGO7M UuMH54P+f9AmAkj98PLlUspK3CiDHJ4mNvRgkuEl4iiTVIZlf/R+HCr7iPIcDqBuMvQ1 Txwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=qisti3W3wpP9r1a7nirVa2nlar29oaY+UwKdINX+jB0=; fh=IiLlUAYZQ4hWuQbi3V9KE00VdjFsw4tg4Y6JCUFRLn0=; b=0OTdQ1jcR25THAM0d6w66uWSk4TALrnZKrT3fsm0gOiI1DIfxfWs0rm0zqYq9HVq+U D2plU+ua0+AcYJz7coviAsbzKGzFt/79kXc+i0zpc4z0WtxgwYRSk+CdAaxwPqWGs1FD iLvZ/+0QfnWrgUTiEoMcaAiCNf8S8vKNHyB/J+nTV7MKGOCQpid4zrbhbtORBpP2Chp1 4K9OQweMmGhjzP0lZa4rq8pwRdKbjNrfHDFkSGD5wxhHgvByz0ajneYy0HftRNg7XRFo SZ0g6nC6N/x/VREW0oHf39YqQrrSzi8/ri5aRWR3q1Vz/IOFUnUXyuppOUVQfN6dumYj Sahw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=LhLrR1UK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nn16-20020a17090b38d000b0026383536294si1895707pjb.175.2023.07.20.15.17.50; Thu, 20 Jul 2023 15:18:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=LhLrR1UK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230303AbjGTVsd (ORCPT + 99 others); Thu, 20 Jul 2023 17:48:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjGTVsb (ORCPT ); Thu, 20 Jul 2023 17:48:31 -0400 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1A241719; Thu, 20 Jul 2023 14:48:28 -0700 (PDT) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 67FFD120002; Fri, 21 Jul 2023 00:48:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 67FFD120002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1689889707; bh=qisti3W3wpP9r1a7nirVa2nlar29oaY+UwKdINX+jB0=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=LhLrR1UKNGDal3fJTPJ2qswlPqFBaTxttrR2QXYdQzajT1SGeToJCXESR1mL/7dpX nFhdFUMQOUHpv8uO69+xz0gbtc0qE+Cf768mIFL3AW94+Cecux7lqSgXAq0Qoq5xao stBOK61h+w+0GgIe6klgJ/bYuSyyrLmiW6bj0TJZpZTINxL54xdVv9BKnj8MXEkKAb sBoG9NnZn5woceNrt43JiJBZNBmJVNjhwOqBzvU1GkwbFQ+PBbbodv2HGJW0pAAud2 z0CZ7TR+K+TIT/uqfmbDqPsK+a93JCuJWFhR+bpgYP/6bvjGyZNZceNLdFq4jFWv/o V+etP7DpWAS1Q== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Fri, 21 Jul 2023 00:48:27 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Fri, 21 Jul 2023 00:48:26 +0300 From: Arseniy Krasnov To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman CC: , , , , , , , Arseniy Krasnov Subject: [PATCH net-next v3 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations Date: Fri, 21 Jul 2023 00:42:41 +0300 Message-ID: <20230720214245.457298-1-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 MIME-Version: 1.0 X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 178763 [Jul 20 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 X-KSMG-AntiSpam-Envelope-From: AVKrasnov@sberdevices.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 525 525 723604743bfbdb7e16728748c3fa45e9eba05f7d, {Tracking_uf_ne_domains}, {Tracking_from_domain_doesnt_match_to}, sberdevices.ru:5.0.1,7.1.1;lore.kernel.org:7.1.1;p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;100.64.160.123:7.1.2;127.0.0.199:7.1.2, FromAlignment: s, {Tracking_white_helo}, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean, bases: 2023/07/20 19:55:00 X-KSMG-LinksScanning: Clean, bases: 2023/07/20 20:04:00 X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/07/20 17:17:00 #21648761 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771979652124033711 X-GMAIL-MSGID: 1771979652124033711 Hello, this patchset is first of three parts of another big patchset for MSG_ZEROCOPY flag support: https://lore.kernel.org/netdev/20230701063947.3422088-1-AVKrasnov@sberdevices.ru/ During review of this series, Stefano Garzarella suggested to split it for three parts to simplify review and merging: 1) virtio and vhost updates (for fragged skbs) <--- this patchset 2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read tx completions) and update for Documentation/. 3) Updates for tests and utils. This series enables handling of fragged skbs in virtio and vhost parts. Newly logic won't be triggered, because SO_ZEROCOPY options is still impossible to enable at this moment (next bunch of patches from big set above will enable it). I've included changelog to some patches anyway, because there were some comments during review of last big patchset from the link above. Head for this patchset is 60cc1f7d0605598b47ee3c0c2b4b6fbd4da50a06 Link to v1: https://lore.kernel.org/netdev/20230717210051.856388-1-AVKrasnov@sberdevices.ru/ Link to v2: https://lore.kernel.org/netdev/20230718180237.3248179-1-AVKrasnov@sberdevices.ru/ Changelog: * See per-patch changelog after ---. Arseniy Krasnov (4): vsock/virtio/vhost: read data from non-linear skb vsock/virtio: support to send non-linear skb vsock/virtio: non-linear skb handling for tap vsock/virtio: MSG_ZEROCOPY flag support drivers/vhost/vsock.c | 14 +- include/linux/virtio_vsock.h | 1 + include/net/af_vsock.h | 3 + net/vmw_vsock/virtio_transport.c | 80 +++++- net/vmw_vsock/virtio_transport_common.c | 307 +++++++++++++++++++----- 5 files changed, 328 insertions(+), 77 deletions(-)