All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhi Li <lznuaa@gmail.com>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Frank Li <Frank.Li@nxp.com>, Bjorn Helgaas <helgaas@kernel.org>,
	lorenzo.pieralisi@arm.com, kw@linux.com,
	Jingoo Han <jingoohan1@gmail.com>,
	gustavo.pimentel@synopsys.com, hongxing.zhu@nxp.com,
	Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>,
	Allen Hubbe <allenbh@gmail.com>,
	linux-ntb@googlegroups.com, linux-pci@vger.kernel.org
Subject: Re: [PATCH V2 0/4] NTB function for PCIe RC to EP connection
Date: Tue, 5 Apr 2022 10:35:25 -0500	[thread overview]
Message-ID: <CAHrpEqT2zwWiiiTUDAu9JNPXmzP1zELF7YDERWjdOohGMFRBnA@mail.gmail.com> (raw)
In-Reply-To: <fa2ab3cf-1508-bbeb-47af-8b2d47904b20@ti.com>

On Tue, Apr 5, 2022 at 5:34 AM Kishon Vijay Abraham I <kishon@ti.com> wrote:
>
> Hi Frank Li,
>
> On 22/02/22 9:53 pm, Frank Li wrote:
> > This implement NTB function for PCIe EP to RC connections.
> > The existed ntb epf need two PCI EPs and two PCI Host.
>
> As I had earlier mentioned in [1], IMHO ideal solution would be build on virtio
> layer instead of trying to build on NTB layer (which is specific to RC<->RC
> communication).
>
> Are there any specific reasons for not taking that path?

1. EP side work as vHOST mode.  vHost suppose access all memory of virtual io.
But there are only map windows on the EP side to access RC side
memory. You have to move
map windows for each access.  It is quite low efficiency.

2. So far as I know, virtio is still not DMA yet.  CPU access PCI
can't generate longer PCI TLP,
So the speed is quite slow.  NTB already has DMA support.  If you use
system level DMA,
no change is needed at NTB level.  If we want to use a PCI controller
embedded DMA,  some small
changes need if based on my other Designware PCI eDMA patches, which
are under review.

3. All the major data transfer of NTB is using write.  Because TLP
write needn't wait for complete,  write
performance is better than reading.  On our platform,  write
performance is about 10% better than  read.

Frank

>
> Thanks,
> Kishon
>
> [1] -> https://lore.kernel.org/r/459745d1-9fe7-e792-3532-33ee9552bc4d@ti.com
> >
> > This just need EP to RC connections.
> >
> >     ┌────────────┐         ┌─────────────────────────────────────┐
> >     │            │         │                                     │
> >     ├────────────┤         │                      ┌──────────────┤
> >     │ NTB        │         │                      │ NTB          │
> >     │ NetDev     │         │                      │ NetDev       │
> >     ├────────────┤         │                      ├──────────────┤
> >     │ NTB        │         │                      │ NTB          │
> >     │ Transfer   │         │                      │ Transfer     │
> >     ├────────────┤         │                      ├──────────────┤
> >     │            │         │                      │              │
> >     │  PCI NTB   │         │                      │              │
> >     │    EPF     │         │                      │              │
> >     │   Driver   │         │                      │ PCI Virtual  │
> >     │            │         ├───────────────┐      │ NTB Driver   │
> >     │            │         │ PCI EP NTB    │◄────►│              │
> >     │            │         │  FN Driver    │      │              │
> >     ├────────────┤         ├───────────────┤      ├──────────────┤
> >     │            │         │               │      │              │
> >     │  PCI BUS   │ ◄─────► │  PCI EP BUS   │      │  Virtual PCI │
> >     │            │  PCI    │               │      │     BUS      │
> >     └────────────┘         └───────────────┴──────┴──────────────┘
> >         PCI RC                        PCI EP
> >
> >
> >
> > Frank Li (4):
> >   PCI: designware-ep: Allow pci_epc_set_bar() update inbound map address
> >   NTB: epf: Allow more flexibility in the memory BAR map method
> >   PCI: endpoint: Support NTB transfer between RC and EP
> >   Documentation: PCI: Add specification for the PCI vNTB function device
> >
> >  Documentation/PCI/endpoint/index.rst          |    2 +
> >  .../PCI/endpoint/pci-vntb-function.rst        |  126 ++
> >  Documentation/PCI/endpoint/pci-vntb-howto.rst |  167 ++
> >  drivers/ntb/hw/epf/ntb_hw_epf.c               |   48 +-
> >  .../pci/controller/dwc/pcie-designware-ep.c   |   10 +-
> >  drivers/pci/endpoint/functions/Kconfig        |   11 +
> >  drivers/pci/endpoint/functions/Makefile       |    1 +
> >  drivers/pci/endpoint/functions/pci-epf-vntb.c | 1424 +++++++++++++++++
> >  8 files changed, 1775 insertions(+), 14 deletions(-)
> >  create mode 100644 Documentation/PCI/endpoint/pci-vntb-function.rst
> >  create mode 100644 Documentation/PCI/endpoint/pci-vntb-howto.rst
> >  create mode 100644 drivers/pci/endpoint/functions/pci-epf-vntb.c
> >

  reply	other threads:[~2022-04-05 20:57 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 16:23 [PATCH V2 0/4] NTB function for PCIe RC to EP connection Frank Li
2022-02-22 16:23 ` [PATCH v2 1/4] PCI: designware-ep: Allow pci_epc_set_bar() update inbound map address Frank Li
2023-12-14 14:31   ` Niklas Cassel
2023-12-14 15:19     ` Frank Li
2023-12-14 20:23       ` Niklas Cassel
2023-12-14 20:52         ` Frank Li
2023-12-14 21:28           ` Frank Li
2023-12-16 10:11             ` Niklas Cassel
2023-12-19 17:59               ` Manivannan Sadhasivam
2023-12-20  5:14                 ` Damien Le Moal
2023-12-20  6:03                   ` Manivannan Sadhasivam
2023-12-20  7:06                     ` Damien Le Moal
2023-12-14 21:39           ` Niklas Cassel
2022-02-22 16:23 ` [PATCH v2 2/4] NTB: epf: Allow more flexibility in the memory BAR map method Frank Li
2022-03-10 22:08   ` Zhi Li
2022-02-22 16:23 ` [PATCH v2 3/4] PCI: endpoint: Support NTB transfer between RC and EP Frank Li
2022-03-10 22:09   ` Zhi Li
2022-12-14  0:08   ` Bjorn Helgaas
     [not found]     ` <CAHrpEqSGySHDET3YPu3czzoMBmCRJsgGgU4s3GWWbtruFLVHaA@mail.gmail.com>
2022-12-14  0:28       ` Bjorn Helgaas
2022-12-14  0:47         ` [EXT] " Frank Li
2022-02-22 16:23 ` [PATCH v2 4/4] Documentation: PCI: Add specification for the PCI vNTB function device Frank Li
2022-03-10 22:01 ` [PATCH V2 0/4] NTB function for PCIe RC to EP connection Zhi Li
2022-03-10 22:07   ` Zhi Li
2022-04-04 20:12     ` Zhi Li
2022-04-05 10:34 ` Kishon Vijay Abraham I
2022-04-05 15:35   ` Zhi Li [this message]
2022-04-20 20:22     ` Zhi Li
2022-04-22 15:15       ` Kishon Vijay Abraham I
2022-04-22 15:36         ` Zhi Li
2022-08-12 14:02 ` Jon Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHrpEqT2zwWiiiTUDAu9JNPXmzP1zELF7YDERWjdOohGMFRBnA@mail.gmail.com \
    --to=lznuaa@gmail.com \
    --cc=Frank.Li@nxp.com \
    --cc=allenbh@gmail.com \
    --cc=dave.jiang@intel.com \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=helgaas@kernel.org \
    --cc=hongxing.zhu@nxp.com \
    --cc=jdmason@kudzu.us \
    --cc=jingoohan1@gmail.com \
    --cc=kishon@ti.com \
    --cc=kw@linux.com \
    --cc=linux-ntb@googlegroups.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.