Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4023154rdb; Thu, 14 Sep 2023 09:27:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTIojSVd0Ak5ekxmx2zxunNpJNc2GzDevTc+kgsTGf2fsFjDcA0GSBU2UkzEeY7EvpV2Gi X-Received: by 2002:a05:6a21:3e09:b0:14e:b4d5:782e with SMTP id bk9-20020a056a213e0900b0014eb4d5782emr6033623pzc.29.1694708868119; Thu, 14 Sep 2023 09:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694708868; cv=none; d=google.com; s=arc-20160816; b=KafnTaSYskkeqxI63JFRH5rxxIP/MiZ+f5OAZ8/lAZwuEvxYICvxyZrZmqsFtGQOjg iCdiF5J54VUqL554dKOXHwZ/oYaR4wQyQIMfQZKDuV0QXyJYNQ2n2rJqcdHRTqrkPCGw DfZIenONUcnAG+sw0ZFvHsZdKVDQYCIVslULFZ4YYq7YxTSYUpGnGIzFe9S5UsxaIIh9 UVguvhoxt4j3oE6Z8GdO2xogZTYZuYKFpeoAWWcqHAMJyxh0m/zpSXzNFga9EsGISO4G isBPrsGFfDwDFl8hRA1bf/CEM1Qe5Pbo/HmmNTMCodjKwEXHa5FuRiPiMmMc/XtKj8g6 mMxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=X/pGng4Jlz5jKGWmwVqa99A3qKH6EyoanXPEX+/wRiw=; fh=JEq7ZyqHwnKMAbPjHbEHIOO1u1YxTWxtQlCbJmwG+xw=; b=mF4YQ+7EVRLdNJx/OJ5NQyNQGpkpK8hIYTT/XiwgRN34FFlTAtEpe5U6O9sT9cbnkm JvH4YEfdpyn62kQb8n9jp2TlfaLxMAT+99Ic+u2K1+2wBc2NEqz4FKYPCPby1nSCfT8q HFkkhfbaFbtsYoOyzdg2wl5MHy5nzgi8e6eiivDsp/gAVFZksBUqUrZRtrZQmL7iI9jH jk9Mb1zI3k6VLGYHX5xleWQyFVNMAbziG9Pz4/zXd12clU8z4f60CdqqX9yjqpu2pmi4 qr2ejWE9g2ob4YMHlCKyYbk8ssQPlXL8oYwGqlOhdiMmmUt63hAo+W8L7oh+UuDzAGX6 zCsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hIRVVVOz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id g25-20020a633759000000b005775e2a7951si1795860pgn.345.2023.09.14.09.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 09:27:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hIRVVVOz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 442658246338; Thu, 14 Sep 2023 06:07:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238674AbjINNHL (ORCPT + 99 others); Thu, 14 Sep 2023 09:07:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238525AbjINNHK (ORCPT ); Thu, 14 Sep 2023 09:07:10 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 45A771FDA for ; Thu, 14 Sep 2023 06:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694696785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=X/pGng4Jlz5jKGWmwVqa99A3qKH6EyoanXPEX+/wRiw=; b=hIRVVVOzKiwgVi2u5A31m4hbSkkKjOsCcwEMo3YF2ynF969HokJTRo83QQm436VsU4RlMh FlOxZoqZvMtAtR1KbYi9vKbEpTeZScmgp/BjxmvpxCDCgknoivMek3sm/ZZqMEPO4nM8fV 4OUCCXo4aMscBy4L5GQ3H2YND1drdHg= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-115-DR0i8qiWP8ujg3PPCORm4w-1; Thu, 14 Sep 2023 09:06:23 -0400 X-MC-Unique: DR0i8qiWP8ujg3PPCORm4w-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-31f3eaa5c5eso569395f8f.3 for ; Thu, 14 Sep 2023 06:06:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694696782; x=1695301582; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=X/pGng4Jlz5jKGWmwVqa99A3qKH6EyoanXPEX+/wRiw=; b=Vejrk2Vv0WudxMWm5Um4BWpXJO7AvTz0P/bCzjTzRyIsWjmEWPW1Emb/5Zh03XtMYh 19TWkZ2LE6VQnOCsQExH31kxRBcaTDiA3L/zdJYHDf3l8/dYCnInOHJFusH7HkuBuXZo BW767ExoU2mDGd/cT65t/T69oCzfkdrQD9Cf7gd+8TuA06/fJ06IsjoExnqXn4X9ub1p sQHXeOsPFjB73Jom8RbwHEAFMzlEV7I1KURLuKuAQ7rb2QzPCohK/u83YuEuu+SvPVjP sV06hUksIkSLyKFH/3a+TPCyiHQWI1Dyu3s2IDfEo9sK2ZtfqRFYxYv7Z4dqwq1CHicJ lWjQ== X-Gm-Message-State: AOJu0Yza/B1b54y4yo5mkZjsXZsUi+5b1fMLt6gKilAKfYXS5Ho0IdR2 CwwHTnLWx6y1LHsqmKvPFUYcn27L014iucwxMglhCVoe/JnmYhdVQiIioS9jdKg3/F337zohAVX aBg5vgOjTzEOp1PvxcG4itAod X-Received: by 2002:a5d:6752:0:b0:31f:b91c:6ebc with SMTP id l18-20020a5d6752000000b0031fb91c6ebcmr4442860wrw.14.1694696782739; Thu, 14 Sep 2023 06:06:22 -0700 (PDT) X-Received: by 2002:a5d:6752:0:b0:31f:b91c:6ebc with SMTP id l18-20020a5d6752000000b0031fb91c6ebcmr4442801wrw.14.1694696781669; Thu, 14 Sep 2023 06:06:21 -0700 (PDT) Received: from sgarzare-redhat ([46.222.114.183]) by smtp.gmail.com with ESMTPSA id 4-20020a05600c22c400b00403b63e87f2sm1940671wmg.32.2023.09.14.06.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 06:06:21 -0700 (PDT) Date: Thu, 14 Sep 2023 15:06:17 +0200 From: Stefano Garzarella To: Arseniy Krasnov Cc: Stefan Hajnoczi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@sberdevices.ru, oxffffaa@gmail.com Subject: Re: [PATCH net-next v8 2/4] vsock/virtio: support to send non-linear skb Message-ID: References: <20230911202234.1932024-1-avkrasnov@salutedevices.com> <20230911202234.1932024-3-avkrasnov@salutedevices.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20230911202234.1932024-3-avkrasnov@salutedevices.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 14 Sep 2023 06:07:12 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email On Mon, Sep 11, 2023 at 11:22:32PM +0300, Arseniy Krasnov wrote: >For non-linear skb use its pages from fragment array as buffers in >virtio tx queue. These pages are already pinned by 'get_user_pages()' >during such skb creation. > >Signed-off-by: Arseniy Krasnov >--- > Changelog: > v2 -> v3: > * Comment about 'page_to_virt()' is updated. I don't remove R-b, > as this change is quiet small I guess. > v6 -> v7: > * Move arrays '*sgs' and 'bufs' to 'virtio_vsock' instead of being > local variables. This allows to save stack space in cases of too > big MAX_SKB_FRAGS. > * Add 'WARN_ON_ONCE()' for handling nonlinear skbs - it checks that > linear part of such skb contains only header. > * R-b tag removed due to updates above. > v7 -> v8: > * Add comment in 'struct virtio_vsock' for both 'struct scatterlist' > fields. > * Rename '*sgs' and 'bufs' to '*out_sgs' and 'out_bufs'. > * Initialize '*out_sgs' in 'virtio_vsock_probe()' by always pointing > to the corresponding element of 'out_bufs'. LGTM, thanks for addressing that comments! > > net/vmw_vsock/virtio_transport.c | 60 ++++++++++++++++++++++++++++---- > 1 file changed, 53 insertions(+), 7 deletions(-) Reviewed-by: Stefano Garzarella