Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A75A3C6379F for ; Tue, 7 Feb 2023 10:29:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230354AbjBGK3l (ORCPT ); Tue, 7 Feb 2023 05:29:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230234AbjBGK3i (ORCPT ); Tue, 7 Feb 2023 05:29:38 -0500 Received: from mail-ua1-x92c.google.com (mail-ua1-x92c.google.com [IPv6:2607:f8b0:4864:20::92c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B891728214 for ; Tue, 7 Feb 2023 02:29:18 -0800 (PST) Received: by mail-ua1-x92c.google.com with SMTP id k26so7884ual.5 for ; Tue, 07 Feb 2023 02:29:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UommVTJaXxWIOJAZoy5o/EUG5Ks0hfVT9tU2NEiYwdg=; b=cRO+42/de4Uh+pv3kGZRiBlNDQQKw1ggRGvdLr4DzdWX8ivcamZ816SOkZdGPE7K+k qAa5EsnzSgpxuxOU67xVCuJaKaOPlOF6ugte1Ho2+BEgHMOh+VQ3mdtAtHXWVK5UWVdy F0jNhXPJokBM000pywFXhmPQoxWNIloTyvnaVpAQQjkpxYSJCIVs/dE+Qvuq8FwYpqO7 OByedRC3nPh5LZwhIAWELfTxyPc03qEu1Kd2oBinjuplsn4FtI3Et4kzu64Uqlzam+gK SsfiPlsJSLCpO+it5mCwJlh1vzQHzQQmOrz1fyZFrh9H6x/Y26kjZ1BFpNpbVUT/5xJm 5FEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UommVTJaXxWIOJAZoy5o/EUG5Ks0hfVT9tU2NEiYwdg=; b=0bm2h3eeu4qMiyLMwLHtMpqFx+TI2SQmYokTggH7HUkBxuBKkPpi47LnqkunOn7vuT zG9N325OeX81SxLlnI3bKP91U577hMwfhKs4wurkFrmTenIApUzQlDB9gfZy5I5idDE3 GPW84ex+wz0ZBR3JFQQ6GaiJXeUOKFF9VaVBMPqNgOClBY9D7EgTI6jkpE96vhI35+YU lu5jSUPSGEfWC8v9YQXtzTgZD+3/blG03+jKZFCyf1LbwJhk96AmfxL293SdJvMqVvA3 DNQj+HtB/r0jn/WDRIYFnOdrDzlS0cq2RQ7mF+fp3ixDVZrF5eHUawFOWB/hYahl5Dx9 IEJw== X-Gm-Message-State: AO0yUKXIr4EEeuqyVpA3burUU07O101JvEH7kmIjngnxSaqv0Y4LnOfF EPaotAWGDJpiFJvykt9p05Sr8/6R2UQogv5bi6GwGQ== X-Google-Smtp-Source: AK7set+vtrzOIUPt3cNy80cmjiPZQoeNH2N8CM9SSDLoBn+2JNI5eWx2e2HNyMEkuQbDC+qeDS5zvamAOgoG3U7qoDs= X-Received: by 2002:ab0:3749:0:b0:669:f7f:882f with SMTP id i9-20020ab03749000000b006690f7f882fmr446807uat.54.1675765757774; Tue, 07 Feb 2023 02:29:17 -0800 (PST) MIME-Version: 1.0 References: <20230203100418.2981144-1-mie@igel.co.jp> In-Reply-To: From: Shunsuke Mie Date: Tue, 7 Feb 2023 19:29:06 +0900 Message-ID: Subject: Re: [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function To: Frank Li Cc: Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Kishon Vijay Abraham I , Bjorn Helgaas , "Michael S. Tsirkin" , Jason Wang , Jon Mason , Ren Zhijie , Takanari Hayama , "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , "virtualization@lists.linux-foundation.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2023=E5=B9=B42=E6=9C=884=E6=97=A5(=E5=9C=9F) 1:45 Frank Li : > > > > > -----Original Message----- > > From: Shunsuke Mie > > Sent: Friday, February 3, 2023 4:04 AM > > To: Lorenzo Pieralisi > > Cc: Krzysztof Wilczy=C5=84ski ; Manivannan Sadhasivam > > ; Kishon Vijay Abraham I ; Bjorn > > Helgaas ; Michael S. Tsirkin ; > > Jason Wang ; Shunsuke Mie ; > > Frank Li ; Jon Mason ; Ren Zhijie > > ; Takanari Hayama ; linux- > > kernel@vger.kernel.org; linux-pci@vger.kernel.org; virtualization@lists= .linux- > > foundation.org > > Subject: [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP > > function > > > > Caution: EXT Email > > > > This patchset introduce a virtio-net EP device function. It provides a > > new option to communiate between PCIe host and endpoint over IP. > > Advantage of this option is that the driver fully uses a PCIe embedded = DMA. > > It is used to transport data between virtio ring directly each other. I= t > > can be expected to better throughput. > > Thanks, basic that's what I want. I am trying use RDMA. > But I think virtio-net still be good solution. We project extending this module to support RDMA. The plan is based on virtio-rdma[1]. It extends the virtio-net and we are plan to implement the proposed spec based on this patch. [1] virtio-rdma - proposal: https://lore.kernel.org/all/20220511095900.343-1-xieyongji@bytedance.com/T/ - presentation on kvm forum: https://youtu.be/Qrhv6hC_YK4 Please feel free to comment and suggest. > Frank Li > > > > > To realize the function, this patchset has few changes and introduces a > > new APIs to PCI EP framework related to virtio. Furthermore, it device > > depends on the some patchtes that is discussing. Those depended patchse= t > > are following: > > - [PATCH 1/2] dmaengine: dw-edma: Fix to change for continuous transfer > > link: > > https://eur01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Flor= e.k > > ernel.org%2Fdmaengine%2F20221223022608.550697-1- > > mie%40igel.co.jp%2F&data=3D05%7C01%7CFrank.Li%40nxp.com%7Cac57a62d4 > > 10b458a5ba408db05ce0a4e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0% > > 7C0%7C638110154722945380%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 > > wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7 > > C%7C%7C&sdata=3DtIn0MHzEvrdxaC4KKTvTRvYXBzQ6MyrFa2GXpa3ePv0%3D& > > reserved=3D0 > > - [RFC PATCH 0/3] Deal with alignment restriction on EP side > > link: > > https://eur01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Flor= e.k > > ernel.org%2Flinux-pci%2F20230113090350.1103494-1- > > mie%40igel.co.jp%2F&data=3D05%7C01%7CFrank.Li%40nxp.com%7Cac57a62d4 > > 10b458a5ba408db05ce0a4e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0% > > 7C0%7C638110154722945380%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 > > wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7 > > C%7C%7C&sdata=3DRLpnDiLwfqQd5QMXdiQyPVCkfOj8q2AyVeZOwWHvlsM%3 > > D&reserved=3D0 > > - [RFC PATCH v2 0/7] Introduce a vringh accessor for IO memory > > link: > > https://eur01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Flor= e.k > > ernel.org%2Fvirtualization%2F20230202090934.549556-1- > > mie%40igel.co.jp%2F&data=3D05%7C01%7CFrank.Li%40nxp.com%7Cac57a62d4 > > 10b458a5ba408db05ce0a4e%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0% > > 7C0%7C638110154722945380%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 > > wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7 > > C%7C%7C&sdata=3D6jgY76BMSbvamb%2Fl3Urjt4Gcizeqon%2BZE5nPssc2kDA% > > 3D&reserved=3D0 > > > > About this patchset has 4 patches. The first of two patch is little cha= nges > > to virtio. The third patch add APIs to easily access virtio data struct= ure > > on PCIe Host side memory. The last one introduce a virtio-net EP device > > function. Details are in commit respectively. > > > > Currently those network devices are testd using ping only. I'll add a > > result of performance evaluation using iperf and etc to the future vers= ion > > of this patchset. > > > > Shunsuke Mie (4): > > virtio_pci: add a definition of queue flag in ISR > > virtio_ring: remove const from vring getter > > PCI: endpoint: Introduce virtio library for EP functions > > PCI: endpoint: function: Add EP function driver to provide virtio net > > device > > > > drivers/pci/endpoint/Kconfig | 7 + > > drivers/pci/endpoint/Makefile | 1 + > > drivers/pci/endpoint/functions/Kconfig | 12 + > > drivers/pci/endpoint/functions/Makefile | 1 + > > .../pci/endpoint/functions/pci-epf-vnet-ep.c | 343 ++++++++++ > > .../pci/endpoint/functions/pci-epf-vnet-rc.c | 635 ++++++++++++++++++ > > drivers/pci/endpoint/functions/pci-epf-vnet.c | 387 +++++++++++ > > drivers/pci/endpoint/functions/pci-epf-vnet.h | 62 ++ > > drivers/pci/endpoint/pci-epf-virtio.c | 113 ++++ > > drivers/virtio/virtio_ring.c | 2 +- > > include/linux/pci-epf-virtio.h | 25 + > > include/linux/virtio.h | 2 +- > > include/uapi/linux/virtio_pci.h | 2 + > > 13 files changed, 1590 insertions(+), 2 deletions(-) > > create mode 100644 drivers/pci/endpoint/functions/pci-epf-vnet-ep.c > > create mode 100644 drivers/pci/endpoint/functions/pci-epf-vnet-rc.c > > create mode 100644 drivers/pci/endpoint/functions/pci-epf-vnet.c > > create mode 100644 drivers/pci/endpoint/functions/pci-epf-vnet.h > > create mode 100644 drivers/pci/endpoint/pci-epf-virtio.c > > create mode 100644 include/linux/pci-epf-virtio.h > > > > -- > > 2.25.1 > Best, Shunsuke