Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp296665rdb; Thu, 21 Dec 2023 09:19:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBptyQg4FwlbCZDdf7l9QPX0lzH+LmM5CUC783TrQa8c4zBzHhY3fkfjHgLfJcBsyeFkvT X-Received: by 2002:a05:6512:3e18:b0:50e:4599:7d34 with SMTP id i24-20020a0565123e1800b0050e45997d34mr2916750lfv.137.1703179148611; Thu, 21 Dec 2023 09:19:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703179148; cv=none; d=google.com; s=arc-20160816; b=aeZHy4d6D4E2OKWKVho28zzkWuG0XrnrCg4XzwVe6w24t40ZMUkqWrkNj0Sh1wMAMO p8i8iBpEsYUVo1Tpl/DM4bNLaFQk89IcaV5TBU2KLvqrzX+a+5j3rXQQwF9mYoTjcH+y 9BPsSfJeLWwtCzxoQKVYAgJ0YSCvI1A4MwJvLu32/XlnLLY4A5HpTlH+ZHL/zFRUMpXo mb0NHWELntfxeeR0q8i4Nx4D/bwOi4jg4TARFfCKI3GcbyCJe/ztEWPtmakmm8UgzB+A M/4vVKoMwWtMmkTtHL5WcJdEJ0FC7uufTTzoI7jm+qfkC49VrlZkpj5RCi5MK2WlrMeV 4Tyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:references:in-reply-to :message-id:cc:to:from:date:dkim-signature; bh=6k/akrlSrIkTy3hb1h59+fzAYQnpfHVd+WuEcLTR0W4=; fh=zYHCdldOxOhyjOe/9BIF4jlxMD4uJfy9M0sVHka026U=; b=PMUwFmMge9N+t+oyb5RCgiP1D3j2QCg6DEzsyQZiVj0U1gVaPcGtGssYi3+QtHKefZ bQxGPB6yFoP7soZk6S4SY7a0jbLYhaZptADT7VcJukBeqh3UJfXRQMW+WYPfqSxRExPF 3bl7O+/YPRYaJk7Q27qZlJBdhQEuqxfWyOxJgTObog1wogF+xLZ+LIjb3V1mQ2Vw0cgf lXGWTCNLutjSzXbamufdDnwfNZIZ/Nt34VVnEyqLN7s3taCkLZcY2EEBDxboSvWoQ9nG G4p0xOCT4c/0nH5J6bZxBo3TuHwSglrdUt9xDDhvB88ibIwM1xxUzq+memHUOIfUwDCk SkyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GTOJe2Ee; spf=pass (google.com: domain of linux-kernel+bounces-8834-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8834-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gw17-20020a170906f15100b00a23559acb7dsi1019222ejb.809.2023.12.21.09.19.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 09:19:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8834-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GTOJe2Ee; spf=pass (google.com: domain of linux-kernel+bounces-8834-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8834-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5B2551F26208 for ; Thu, 21 Dec 2023 17:19:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 876CE634F8; Thu, 21 Dec 2023 17:17:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GTOJe2Ee" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 788A85993E; Thu, 21 Dec 2023 17:17:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-5942259ca62so526238eaf.3; Thu, 21 Dec 2023 09:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703179040; x=1703783840; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=6k/akrlSrIkTy3hb1h59+fzAYQnpfHVd+WuEcLTR0W4=; b=GTOJe2Ee9wmgRpnln3+gnL71cwdoHwKOvQeCpEcuDGw5Dqav2JWIGBwbFU/caAODgY xhHQSX0fbs23LywpwOeKYTXQRfNjABtrg8T6fKmhI9lVaW2O84BpVAwd4hxlGofSLcZA 8PIYwxchzxuiE0EgA96FT7GiiJvumFrNFCDsT5Qn5lwE83VGsGpnhM8TtWw37ARezPXP nAHXk4MRBrvbrNiVfSjAYBf7XfPlMbhze8r8CYO346R4CzcbwTzl2eim7hSQJwfeGotf Vf8PmUrR8vS3ZH+eAyx+mG+lN319dDVskeYXt0o+jBBXB/KIMaqis2VWdEDwI7CZNE2e aLBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703179040; x=1703783840; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=6k/akrlSrIkTy3hb1h59+fzAYQnpfHVd+WuEcLTR0W4=; b=gdquXdxIPRKc6ZpFNt1+4zI6b0n7u21OrF1EzfKT+30ycVT3QD8u5ZR/hWe34OqN4m RXfNeDU4KxOil9mfXLvIFlTSz8I07HWWuzxa3VUbTWdJcpdbkC95WJz4EY27A3XKQguR ulHyGda8DqhZF/umOwV+qfzPqYvv2YABccNg0gjiBsibjsJv5UdEFIRFb2wyZCw7swCk WatoqoeIUNCiAzwLNzLt5Mikn73gRGOIk+zNaGsEsoSLEBuUfby2b0dnF+r62uYQDmgT FZZGbjshn3iXr5vq+WuBXcdncwTOrvrf4hkQEg2JGDEks1Y7Q20ejRl+BGDaJ6BT2HMU 491w== X-Gm-Message-State: AOJu0YzBJErQ6krGApEwQ6fDrj8s95kZUUGy3sVOXgYJJ9abNd9auNfI GQhOyFVxFYudE1xKtkdA41U= X-Received: by 2002:a05:6358:724a:b0:172:ae6e:bdd4 with SMTP id i10-20020a056358724a00b00172ae6ebdd4mr57936rwa.7.1703179040274; Thu, 21 Dec 2023 09:17:20 -0800 (PST) Received: from localhost (114.66.194.35.bc.googleusercontent.com. [35.194.66.114]) by smtp.gmail.com with ESMTPSA id bo9-20020a05621414a900b0067f7b0904c3sm755136qvb.83.2023.12.21.09.17.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 09:17:19 -0800 (PST) Date: Thu, 21 Dec 2023 12:17:19 -0500 From: Willem de Bruijn To: Mina Almasry , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux.dev Cc: Mina Almasry , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Stefan Hajnoczi , Stefano Garzarella , David Howells , Jason Gunthorpe , =?UTF-8?B?Q2hyaXN0aWFuIEvDtm5pZw==?= , Shakeel Butt , Yunsheng Lin , Willem de Bruijn Message-ID: <6584731f9eab1_82de3294d0@willemb.c.googlers.com.notmuch> In-Reply-To: <20231220214505.2303297-2-almasrymina@google.com> References: <20231220214505.2303297-1-almasrymina@google.com> <20231220214505.2303297-2-almasrymina@google.com> Subject: Re: [PATCH net-next v3 1/3] vsock/virtio: use skb_frag_*() helpers 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=utf-8 Content-Transfer-Encoding: 7bit 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. > > --- > 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++; > } > } If there are requests for further revision in the series, can send this virtio cleanup on its own to get it off the stack. > -- > 2.43.0.472.g3155946c3a-goog >