Re: [PATCH v2 0/3] PCI: endpoint: Add PCI DMA endpoint function (part 3/3)

From: Koichiro Den

Date: Mon May 25 2026 - 22:04:31 EST


On Mon, May 25, 2026 at 10:32:06PM +0200, Niklas Cassel wrote:
> On 25 May 2026 16:03:35 CEST, Koichiro Den <den@xxxxxxxxxxxxx> wrote:
> >On Mon, May 25, 2026 at 10:35:46AM +0200, Niklas Cassel wrote:
> >> On Mon, May 25, 2026 at 04:05:02PM +0900, Koichiro Den wrote:
> >>
> >That restriction should be documented with the new NTB transport, which I will
> >submit if the direction taken by this series is acceptable.
>
> This is easy for me to say, since I am not the NTB maintainer, but it would be nice if we could somehow come up with a design where we don't only support EPCs that have 'max-functions' != 1, because IIRC, most PCI EPCs have 'max-functions' == 1.

Yes, that's fair point. As a quick check on v7.1-rc5, among DWC-based EP nodes,
only 6 out of 45 set max-functions > 1 (about 13%). Assuming there are no cases
where the hardware supports more functions than the DT advertises, that means only
about 13% of DWC-based EP instances described in DT could support the "NTB
transport backed by PCI EP DMA" use case. If I also count non-DWC EP nodes, I
get 15 out of 64 (about 23%).

If supporting single-function EPCs is a requirement, then the separate PCI DMA
EPF model is not a good choice for that NTB transport use case. We would need to
keep the DMA delegation metadata inside the vNTB function, or use some other
single-function design.

That is basically option 2 from my earlier mail:
https://lore.kernel.org/linux-pci/xnfnxv64hpil6if4ikyohxnarvsekbmjcc37k5zej264ix46z3@qtu6xj2uy3xi/

[snip]
2. Treat endpoint DMA as a first-class part of vNTB. The RC-side ntb_hw_epf
would create an auxiliary device, and a new dw-edma-aux driver would create
the delegated DMA channels on the RC side.

[PATCH 00/15] PCI: endpoint: Remote DMA support via vNTB
https://lore.kernel.org/linux-pci/20260312165005.1148676-1-den@xxxxxxxxxxxxx/

I added an ASCII diagram for the overview as a follow-up comment here:
https://lore.kernel.org/all/sn67hi7kljh7cgmgodatb3naz2astlaklqfobdbxyyzgoohxqb@4nnetbhqwba4/
[snip]

Do you prefer the vNTB-integrated model over this series?

Best regards,
Koichiro

>
>
> Kind regards,
> Nikla