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: 178409 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8267622dys; Wed, 13 Dec 2023 18:06:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZWf1404CtbHbxnYD0XIzkqPIU+Zl1QS8xRAtuMqAI2owX0klKp4+a3oIDF8dj24Yv+3AY X-Received: by 2002:a05:6358:99a0:b0:170:2e2f:8c8 with SMTP id j32-20020a05635899a000b001702e2f08c8mr11554195rwb.5.1702519583714; Wed, 13 Dec 2023 18:06:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702519583; cv=none; d=google.com; s=arc-20160816; b=fCh/yNumbHOBnRCDGWVJBJxk6GKDFMeSMps+HT23+cGga/QU0NhdxOEOrCTUcUkoqL zDBeDGFZDet3VgaXAjawSdqppyOXcvuUbzSOx+b89rcE2Anlz+5Zs6wPy/ka6YFi6QCm Y5z2ERRkCJz38RrlB8SeCeoZWq5Qivmskx+vBwxIlzj/BVc5DD6gROLiM0dgHlAwnxb3 M1af0vEidCDLGAp6fBScZi5Xg+zSpo6tdwA2nxAyJz6MvsqFwxoRNppmq7GP3TQuOQGB 1XCK++9hwOZiIipYtX0/sJZMWbrNJ0uCuZlntr6GRye1dac5jeWCTl74syqz/O4TEmAf /0YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=+ronbOySVVJCeCFXE+E452YTaKGaTM58JCsYafTPHk4=; fh=2cTpkOQdVNm4Kv9XaiKb49A4tmrQwCTD9dCd1XGCiM8=; b=QFkJ/XZOS2I/6vDtqd43JLmhk9sIfYy07aESwom8oCAniDO4B3KoU9/k2NVuRfcUKt UwiOYU62fe82IWF8rQqC5mEXvSRW7e6Bqq71cJPL0IOjwmmFZtfmbhWOkqnf4YcleWYI MUERAIzHR3XFtj+lTa+0G99yB94hbDVqg63NcVW/jkg/Ui0DSYnD4Ou0TGFl4UIOfGwd ZGuFld3nHuZX4gIqSehIAYrCmwQZpE+t4jQQDbmXL2VwyTXJPJKtAALkOg8toa9+NjRr hnsebPdG3zeawrXDT2bXAwbOKLybHBot9vKEI6JxdddpB820m+X62hhaYHnFEbyUHw+/ bO8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=O2j4yHTF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id gt14-20020a17090af2ce00b00286c13656dcsi4023168pjb.187.2023.12.13.18.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 18:06:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=O2j4yHTF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7A0568070669; Wed, 13 Dec 2023 18:05:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442960AbjLNCFd (ORCPT + 99 others); Wed, 13 Dec 2023 21:05:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234195AbjLNCFb (ORCPT ); Wed, 13 Dec 2023 21:05:31 -0500 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 2616FE4 for ; Wed, 13 Dec 2023 18:05:38 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-dbcca990ee9so1811155276.0 for ; Wed, 13 Dec 2023 18:05:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702519537; x=1703124337; 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=O2j4yHTFdH4Gpg94umNd+/vXPVzeJMcj0A46SsXoBpcqoVIHwpjY6eXU/AdPlb1yUd 6779vyYmeDcnhCnDOOagQRJ2hdBCLXYU0Z0uCDcIqyibpqDwupCLm3GY4wkWV6U/yCmx kx8lCopO+tYLcm7ub7xqp1ePTyowyQ/kbUWT9D3DjcnwvF8YGCYCS2S9rIvqDOy8f5BC oQiuHbbOA1wEQDdN8cYGYdiZVATuGAiUa/5n8Dwd0CgYCUuirhxfd88m6Lx5ULI+hRbN GGnLMu5OvnMFoucjTH8IOENKXYUr2RhiyO4IWUvRvn8aIbvk7/0o4MsO3GN4KFLtxxHQ AbxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702519537; x=1703124337; 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=nr371bosPMmHkhbZpZneM77za902f6Psv9zAATHF6ZFNLmUUsopqoDxXM+S+NDZv0z EH9bxZRC5M0OMH2LFcEbro4MAo4SUydOH0w5CD/NTjVSwXEbJHu3AbKHSvQ87WdLoFuk AFHz28ST5fUp9pnZQ8zesa6Yk191X91LErNDcKaP7/m9EX6nGky89QKlwTlI4tbg3xgU rw8LiElIbdFyAZ7BghOYjk+hSEhHzp73FxPhA+UnGNmcn9CvgfHWk4NJDzwEfLwEcXA2 eeaq/Hb+LBQraB6FE8j8snvj+MQYa+4qZziBR7KLNLKOCGVeXo2o2ye17sDVl4ZtGIiW X/hg== X-Gm-Message-State: AOJu0Yxie/yrXO+ThdZwnnICu4wwVg5IaEJUfkqUyRkeZQ/U70C5Lh1m aN9NrVBlWp0IcQXPxk8EL5lAQ4VYEympndUMCq23ZAJnUFX9HtfDMghd+mkX6Zj7fZ7G2QTymxt 7Fd3yAtGNVc435A8deGH6Y4kM0nck6VqSs3JRMpcKjMDuu6n1iP+j2FOqgU2Tz4jPdUiTIt6ho4 K/Lk3styk= 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> 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-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 18:05:45 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785221174957885388 X-GMAIL-MSGID: 1785221174957885388 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);