Message ID | 20231217080913.2025973-2-almasrymina@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-2501-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp599177dyi; Sun, 17 Dec 2023 00:10:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoIcTLGwfVn/JaO9Ag52B+EbJv8o9jkhw5x5OrrzWEBJ2kA94Jq3zI2NX/es0psGJpvrfo X-Received: by 2002:a92:c24d:0:b0:35d:637e:c3d2 with SMTP id k13-20020a92c24d000000b0035d637ec3d2mr19289045ilo.20.1702800626026; Sun, 17 Dec 2023 00:10:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702800625; cv=none; d=google.com; s=arc-20160816; b=ltG1jDJo5jik4OW05Xu6hO+UJRCIr2+068+k/x52wQ2FnsaCWad9VoEAu3Kv9O7Qml 9KbOdbKKH8cjwpEfuXkQgmOeNfJ8/nLBLxn0zOR0JgYZ5YAKT9myjaTNyt9FgG5BUf7d fDelRdOkPnoKtYXhqfr/jnANe1Mu0NBCj8Gw0C+W/tkSluCwPXo08cYRJAJdTMTboWZ4 mS4HESMh2CpvF702HXCEwDXMVhI7gaoQ9mqqydUDfrFU8V+iJ+CDAJNyOdVjuXaD2Tzy lVOohwn5ApKoiaqzBrvKY1Kuw9kiQbrl99YwIFLPTJrBDWZz45hlYSCXFzjEGqI6twgq r+kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=Dx3B6aLRQGDHWIOJfDNBvVD3RlXkr+3jhLG4738eUjE=; fh=5+YZn3qid70ipf23l+1Skq9YU3IOegijAT5j4LrIkeM=; b=j3f74yVOnYZEBUVG1ENgfyDQmqjBRVXb2lcCpo/ljOrmd6O9E7kKtNSpRMAOkwJatK SFn5BpCJKvfC4BmL32yyeYyznp9QLjuTwTiKJH1qCCXd4FKSH7Tx7Irttpn13T4FQTcu /vT1UalIGA1OEzvSGd7Y0rSYyk4/+CX/rF38sIbU1yuzL0JiCM+lLNNg1PTt9V9Gkfx4 tCylLCEc3MdZk06AV09V2ZENEvOPybcCzN3NY0Zg8IbNZkjDxKvnIRbqKgAO2cs5GB+w eWtTBCDSnExJ0gaimQ+knthn7n5stUlQ1Sia2F5PM+Wld7Bf2gw1lTlNiUPbYEwCTIEG 40cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=vhvMowPD; spf=pass (google.com: domain of linux-kernel+bounces-2501-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2501-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w2-20020a170902e88200b001b045d65aedsi16001574plg.228.2023.12.17.00.10.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 00:10:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2501-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=vhvMowPD; spf=pass (google.com: domain of linux-kernel+bounces-2501-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2501-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 C5B8C283511 for <ouuuleilei@gmail.com>; Sun, 17 Dec 2023 08:10:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27EAA63C6; Sun, 17 Dec 2023 08:09:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vhvMowPD" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 26D641C20 for <linux-kernel@vger.kernel.org>; Sun, 17 Dec 2023 08:09:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--almasrymina.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dbcd8c649edso2264153276.3 for <linux-kernel@vger.kernel.org>; Sun, 17 Dec 2023 00:09:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702800560; x=1703405360; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Dx3B6aLRQGDHWIOJfDNBvVD3RlXkr+3jhLG4738eUjE=; b=vhvMowPDr4sLum8/34TI9++Tk1uFJc07pqhf20tmo5zM3v8PhMagvrXPbIQ8OIpLBD 9xnezFGb/RekGg82Z/GCkdBWQH8ehOHy4FtpvNQRRwNlJVw9tmjp8h8warVitOJHtpOz uCBs4eDOgK3WjSGPoBJ9t3giV92Lupxo5w4CDXt8awG4/wCWQndY6NVMd7F6zklL3r2/ z/c7hfrYs3nRP2b4kQqK5ECfCVIB6ctsjfQDUbHU8y1zSgUSrpavluBB4tuJp2pOnOhC 6+nKGicouYy8xQ5y38Pi9O1TAy4D71VYzaVL+iZYL6i7990iKpF9NlgxespIru74W194 RpIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702800560; x=1703405360; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Dx3B6aLRQGDHWIOJfDNBvVD3RlXkr+3jhLG4738eUjE=; b=s3P43b0Uri5Ye4sUvNeZb3dDEciRMY4Awk2cJtBywfaikj4081PD54etCMjGKPypW2 byrdUCAZlIY/8zFvqrNbouhuMmU2j5NlkbwK7qrmYTemD5Ru7gqJkKMGAzOewE33YkG7 i1di93KexiNsok7bleZlMuvueqw2QGOu1Agszarooyxe3jnq0hv+q/yjos4RpsNDypbi is9YrUDgkl7Q6Nk9/gZidk1G8mBzxCPWE9LKQlwGz0Mi/LRUz9DwSddAVE1oJvCWPOxM 12dEV9mj2U6tmRj9mQK35cWUnGWdKPRdYhZTTNBatLYH3pRKGklkn6JJ+XVJCJ0v9l6h d0cw== X-Gm-Message-State: AOJu0Yyni5GImNM0qHNw/Ng2pikZT79jhHHEIIZtXVhRUfGkPuVtOFMX dHBDyon4jNxd5HnDMuD0lorI7NEHtCrUHx5CsKASnu467ftoNXEI0m+zu7A6Y/XBOsJPI7vJUzB Qnzb/tcgACyhvemxeMIfdPrZwzDzKLdHG82HjbMjqSEvFNrC+3TnsjN0zAYG/s0wt6E7s7IZZcm pbrXnmE4I= X-Received: from almasrymina.svl.corp.google.com ([2620:15c:2c4:200:3eb4:e132:f78a:5ba9]) (user=almasrymina job=sendgmr) by 2002:a05:6902:1343:b0:dbd:13b8:2598 with SMTP id g3-20020a056902134300b00dbd13b82598mr628107ybu.3.1702800560127; Sun, 17 Dec 2023 00:09:20 -0800 (PST) Date: Sun, 17 Dec 2023 00:09:09 -0800 In-Reply-To: <20231217080913.2025973-1-almasrymina@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 References: <20231217080913.2025973-1-almasrymina@google.com> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog Message-ID: <20231217080913.2025973-2-almasrymina@google.com> Subject: [PATCH net-next v2 1/3] vsock/virtio: use skb_frag_*() helpers From: Mina Almasry <almasrymina@google.com> To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux.dev Cc: Mina Almasry <almasrymina@google.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, Jason Gunthorpe <jgg@nvidia.com>, " =?utf-8?q?Christian_K=C3=B6nig?= " <christian.koenig@amd.com>, Shakeel Butt <shakeelb@google.com>, Yunsheng Lin <linyunsheng@huawei.com>, Willem de Bruijn <willemdebruijn.kernel@gmail.com> Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785515869223584378 X-GMAIL-MSGID: 1785515869223584378 |
Series |
Abstract page from net stack
|
|
Commit Message
Mina Almasry
Dec. 17, 2023, 8:09 a.m. UTC
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 <almasrymina@google.com>
---
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++; } }