• Top of the PCIe tree

    From MitchAlsup1@21:1/5 to All on Wed Feb 5 03:08:17 2025
    Let us consider a device down on the PCIe tree and it sends up a
    DMA request. The device can manage a large number of outstanding
    commands to a single process or to multiple different processes.
    {{Same problem for interrupts and ATS requests}}

    DMA from device Bus;Device,function arrives at the HostBridge.

    What part of the PCIe message identifies which command this
    PCIe message is for (since the device can have a large number
    of commands outstanding) ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theo@21:1/5 to mitchalsup@aol.com on Wed Feb 5 12:22:21 2025
    MitchAlsup1 <mitchalsup@aol.com> wrote:
    Let us consider a device down on the PCIe tree and it sends up a
    DMA request. The device can manage a large number of outstanding
    commands to a single process or to multiple different processes.
    {{Same problem for interrupts and ATS requests}}

    DMA from device Bus;Device,function arrives at the HostBridge.

    What part of the PCIe message identifies which command this
    PCIe message is for (since the device can have a large number
    of commands outstanding) ?

    There's a 5 bit tag in the PCIe TLP - when the response comes back, the
    device can use the tag to identify which request it relates to.

    (not sure if any of the PCIe extensions extend this to more than 5 bits, as
    it means only 32 transactions can be in flight from one BDF)

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Lurndal@21:1/5 to mitchalsup@aol.com on Wed Feb 5 15:03:40 2025
    mitchalsup@aol.com (MitchAlsup1) writes:
    Let us consider a device down on the PCIe tree and it sends up a
    DMA request. The device can manage a large number of outstanding
    commands to a single process or to multiple different processes.
    {{Same problem for interrupts and ATS requests}}

    DMA from device Bus;Device,function arrives at the HostBridge.

    The Memory read and write TLPs do not identify the source
    function using the configuration address (BDF). Those
    TLPs contain the target address. The PCIe controller
    will construct a target RID (Segment + BDF) to pass to the
    IOMMU based on the port upon which the request was
    received (and the captured bus number from the target).

    Config Read and Config Write TLPs have both the target and
    source RIDs (routing IDs) in the TLP, although depending
    on type 0 or type 1, they may not contain the full RID,
    but only the dev/func (or just func for ARI endpoints).


    What part of the PCIe message identifies which command this
    PCIe message is for (since the device can have a large number
    of commands outstanding) ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MitchAlsup1@21:1/5 to All on Wed Feb 5 22:17:12 2025
    Thanks to both of you !

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)