Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6445212rdb; Tue, 2 Jan 2024 02:00:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbCMlnw6w6PJh/sjtJMA/LBJpcvwhLG9pEU5yYe9TTpWK5nxqtEfW1j0YgfcLvsJ2UxdWo X-Received: by 2002:a05:6358:2808:b0:170:f159:d4bf with SMTP id k8-20020a056358280800b00170f159d4bfmr16329135rwb.42.1704189639139; Tue, 02 Jan 2024 02:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704189639; cv=none; d=google.com; s=arc-20160816; b=UONJPSxDpf4XStwAt6orQsmcqkuftx1i4Si+npKTQ0m0YqITw4gPZGTRYGxt51U2gR 9vV5GZ4t1CtVQ2XBK02aBX0WkFpj/rvEg+rg/iXml89OV3ZS/sxtivGPUrraeuiGKzTS uNyE8YPVhedTFfvDCo4yoeIG3Ppap6dHcVwZfUma2t15fwMWExMUyvMZ0I4bo5ajUaME KVuZ2VZheM8367BleYAxtEateoanjLumTBXqwgvYa4o/2p4+qwcmjwH+r8rnvd5xqddd Vj0qA5ZjQKPI820QdIu4DbP+ICPvl6VaLwII/3WIffmU3Sl9WD9qCkbEeKwrr5oBH+WR Y8bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=41ZHkYLIzXdzlI467/3yvpKL+LfhtQ/UVRwyY0aP7do=; fh=1P4+muV3lLa2nGV9LCClJMW33wzsRz3cGOQ0OestHaY=; b=SmIFhPPzMQVrw5bbIJd8mB1W0fT/7RXSiN1qurvV2X12weB0SnLraayytI1XuvhoF0 cp8Z6L5rUaK8dmbKvGBJ2qx6UJ/cTZfWR4nKC8ILlJcrvaIfyHsHZBuwzq1uLnEANDg2 QhLDyaQn9I8KNr1O3upJ0+RkBSSJaX4t0L5b5NO23UGxEIcuU2I6pH0OzLuRdzKtTUgk MkBg9PCqIBbEaoxaMFxfwCQjzIo7MVv0K7pX0l8fKQfPabNe42Jd2tyBpy9WqyKjZvTw BWc/qz3HuFpX1nxTMuaK3OUse0jXdhaTaekaCyCcurw7aEY+fA1ZiJpREz3jR+GrOapV JkRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ccsuBQIb; spf=pass (google.com: domain of linux-kernel+bounces-14219-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14219-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t18-20020a6564d2000000b005cdf55c924esi17449459pgv.750.2024.01.02.02.00.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 02:00:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14219-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ccsuBQIb; spf=pass (google.com: domain of linux-kernel+bounces-14219-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14219-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 39EEF282DE8 for ; Tue, 2 Jan 2024 10:00:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5FAFD268; Tue, 2 Jan 2024 10:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ccsuBQIb" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83726CA6F for ; Tue, 2 Jan 2024 10:00:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704189628; 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=41ZHkYLIzXdzlI467/3yvpKL+LfhtQ/UVRwyY0aP7do=; b=ccsuBQIb8ysJvI+AcxNtyDAMQeK0IXmV050w+4fOtNDtG5vcEBp5tLS4fYF6cHvtj75gtC 2WM6g/geJwdPikxJSiVXr/cZAulTJkN+ODLNbCaoO3O50XQwKRH+eZy1FbK5949G7PFvP9 WkbaMigDHqBxAv6Jdb6Kl7+GE4CUPug= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-651-kdCAdpLBNHaMbaGdv_k4jQ-1; Tue, 02 Jan 2024 05:00:26 -0500 X-MC-Unique: kdCAdpLBNHaMbaGdv_k4jQ-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-40d6045090cso30124165e9.3 for ; Tue, 02 Jan 2024 02:00:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704189626; x=1704794426; 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=41ZHkYLIzXdzlI467/3yvpKL+LfhtQ/UVRwyY0aP7do=; b=aMJvdq4u2bRBAO8EfEWJfAi37osHkG+VpPeoRX6oHYvBuIFf1G1iVswT0AtmhpxDAD pe6jbVMSqgLlL46BNz6DP9GKjwiLIfsfElYA1+OYjuf++zmg+J1Ww62QQ3XtLKKF/MtM rT58aOWOUjqUSdf46Va+AX68JB9vzfUuzyRITJq4l0WNHMIXM3afR4SPslT3CH9O/F// l0YoEP6wPsmGAXhDoxuW9Ys1PsQC+CxKi4+UhvAc8rY+BTY7b1+zxYkABGy01NsJten1 vkRDtF/LQAkl5cNq14UBDlsWHNroQoKXLX85a87NPWpuk4rRpnhMnhexSHgB96y6YKsw 16mw== X-Gm-Message-State: AOJu0YzoDDa6cifAvugM1nYJawMmQe4orfBTAdg/CjwQd/y/4PXIuBVk nVYkkcBiSfzooueu2zOlEEP9JjHGUpg+qEitH+s51BLjmiCgnSudD4Kvbe7yIyDa5AWkSAxzDLq 03473UbavYJBUlQNfrYq0uXnDXibyU42e X-Received: by 2002:a05:600c:19c8:b0:40d:4da9:db82 with SMTP id u8-20020a05600c19c800b0040d4da9db82mr9938202wmq.45.1704189625786; Tue, 02 Jan 2024 02:00:25 -0800 (PST) X-Received: by 2002:a05:600c:19c8:b0:40d:4da9:db82 with SMTP id u8-20020a05600c19c800b0040d4da9db82mr9938186wmq.45.1704189625439; Tue, 02 Jan 2024 02:00:25 -0800 (PST) Received: from sgarzare-redhat ([5.179.173.123]) by smtp.gmail.com with ESMTPSA id q17-20020a05600c46d100b0040d802a7619sm13228741wmo.38.2024.01.02.02.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 02:00:24 -0800 (PST) Date: Tue, 2 Jan 2024 11:00:12 +0100 From: Stefano Garzarella To: Mina Almasry Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux.dev, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Stefan Hajnoczi , David Howells , Jason Gunthorpe , Christian =?utf-8?B?S8O2bmln?= , Shakeel Butt , Yunsheng Lin , Willem de Bruijn Subject: Re: [PATCH net-next v3 1/3] vsock/virtio: use skb_frag_*() helpers Message-ID: References: <20231220214505.2303297-1-almasrymina@google.com> <20231220214505.2303297-2-almasrymina@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20231220214505.2303297-2-almasrymina@google.com> On Wed, Dec 20, 2023 at 01:45:00PM -0800, Mina Almasry wrote: >Minor fix for virtio: code wanting to access the fields inside an skb >frag should use the skb_frag_*() helpers, instead of accessing the >fields directly. This allows for extensions where the underlying >memory is not a page. > >Signed-off-by: Mina Almasry > >--- > >v2: > >- Also fix skb_frag_off() + skb_frag_size() (David) >- Did not apply the reviewed-by from Stefano since the patch changed >relatively much. Sorry for the delay, I was off. LGTM! Acked-by: Stefano Garzarella Possibly we can also send this patch alone if the series is still under discussion because it's definitely an improvement to the current code. Thanks, Stefano > >--- > net/vmw_vsock/virtio_transport.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c >index f495b9e5186b..1748268e0694 100644 >--- a/net/vmw_vsock/virtio_transport.c >+++ b/net/vmw_vsock/virtio_transport.c >@@ -153,10 +153,10 @@ virtio_transport_send_pkt_work(struct work_struct *work) > * 'virt_to_phys()' later to fill the buffer descriptor. > * We don't touch memory at "virtual" address of this page. > */ >- va = page_to_virt(skb_frag->bv_page); >+ va = page_to_virt(skb_frag_page(skb_frag)); > sg_init_one(sgs[out_sg], >- va + skb_frag->bv_offset, >- skb_frag->bv_len); >+ va + skb_frag_off(skb_frag), >+ skb_frag_size(skb_frag)); > out_sg++; > } > } >-- >2.43.0.472.g3155946c3a-goog >