From patchwork Thu Dec 14 02:05:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mina Almasry X-Patchwork-Id: 13492198 X-Patchwork-Delegate: kuba@kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="DkHmqonU" Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63E18E3 for ; Wed, 13 Dec 2023 18:05:37 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-dbcda5ef8daso965266276.3 for ; Wed, 13 Dec 2023 18:05:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702519536; x=1703124336; 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=+ronbOySVVJCeCFXE+E452YTaKGaTM58JCsYafTPHk4=; b=DkHmqonUytnYF2oN/aGhCb13hqOLBVcsnUgMBwRHn3risdLIOysKUH+t8sDqud79zu K6rRA7CpcP1LSQUqdJ5N58ZLzTC3GsgLdi82mftGk8ZD9TkJ13Mao81gr5Wun5Y9o3v7 SLnl9pzl+5+Qk0dEqwfQXxz0WntaFts4guHWfXp5Ng1gzNsnZa1w/jSEJagKb+Z50LMc PvTrtmqu/cHBXlVoRRHTu47w1DAX4ek3nUfTCmaj197cQtx+AD/0QptT1bsIokQki8C7 e7B47lCJ3HjRTzTwy6HxdFljYpvKmrKqDWPqLoL2HH/SwWUD5hqKq2ohojVabEn6cChB ilIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702519536; x=1703124336; 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=+ronbOySVVJCeCFXE+E452YTaKGaTM58JCsYafTPHk4=; b=mcMwYZgDyz0TET6L1M835vi1ct9SgHUc/Km3AujI1BhgS5FO+ZTmd6KpfM2W88ATHK XVItURYng1FWUvhkV8LfWuHVR5S3GJH5BV1GKm8/e/VmJvv0weVOKl6/+5rwGxgxchJj DMMoC9TjQ78Hax0wvqwNOYEXXgK+1jGm1a7z6Xdv0A+h+oAFyF8YCPGGqMuTV3HXplUT kwtsw8SSnV9UBM9EuTGrMXeIUkbDg5jUpyvdkn9PZoG+PUPOa+EdOjk82mvuONQkEMHC EeaJASMe4RwYRjWKxCMe3KNn3bpomaxKyWthLwny/rCjPs+PJoF6HRO9auv2XaAIWLcU EAtg== X-Gm-Message-State: AOJu0Yyl6bjbv630XyGZ+mHV5xgMGoqJuScba7OzfKxkipXAApC7HwyF H4GGmbP5M7YNqdHoVmR8ai6KT/081HhtgMZJqw== X-Google-Smtp-Source: AGHT+IGncV41fwbhz/mCy6hSR3EOohDoL5eRhnTHrk4bhzSdLjyeCnLJseqiKf/w0iEIyiWoDGOSz2aVqCYno2zrog== X-Received: from almasrymina.svl.corp.google.com ([2620:15c:2c4:200:d31b:c1a:fb6a:2488]) (user=almasrymina job=sendgmr) by 2002:a05:6902:545:b0:dbc:e64a:ccd6 with SMTP id z5-20020a056902054500b00dbce64accd6mr1821ybs.9.1702519536540; Wed, 13 Dec 2023 18:05:36 -0800 (PST) Date: Wed, 13 Dec 2023 18:05:24 -0800 In-Reply-To: <20231214020530.2267499-1-almasrymina@google.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20231214020530.2267499-1-almasrymina@google.com> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog Message-ID: <20231214020530.2267499-2-almasrymina@google.com> Subject: [RFC PATCH net-next v1 1/4] vsock/virtio: use skb_frag_page() helper From: Mina Almasry To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Cc: Mina Almasry , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Greg Kroah-Hartman , "Rafael J. Wysocki" , Sumit Semwal , " =?utf-8?q?Christian_K=C3=B6nig?= " , Michael Chan , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Wei Fang , Shenwei Wang , Clark Wang , NXP Linux Team , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Thomas Petazzoni , Marcin Wojtas , Russell King , Sunil Goutham , Geetha sowjanya , Subbaraya Sundeep , hariprasad , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , AngeloGioacchino Del Regno , Saeed Mahameed , Leon Romanovsky , Horatiu Vultur , UNGLinuxDriver@microchip.com, "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Jassi Brar , Ilias Apalodimas , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Siddharth Vadapalli , Ravi Gunasekaran , Roger Quadros , Jiawen Wu , Mengyuan Lou , Ronak Doshi , VMware PV-Drivers Reviewers , Ryder Lee , Shayne Chen , Kalle Valo , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Stefan Hajnoczi , Stefano Garzarella , Shuah Khan , " =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= " , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Jason Gunthorpe , Shakeel Butt , Yunsheng Lin , Willem de Bruijn X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Minor fix for virtio: code wanting to access the page inside the skb should use skb_frag_page() helper, instead of accessing bv_page directly. This allows for extensions where the underlying memory is not a page. Signed-off-by: Mina Almasry Acked-by: Stefano Garzarella --- net/vmw_vsock/virtio_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index af5bab1acee1..bd0b413dfa3f 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -153,7 +153,7 @@ 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);