[PATCH v4 0/3] raw/ntb: add AMD NTB support
David Marchand
david.marchand at redhat.com
Mon Oct 26 16:26:01 CET 2026
Hello,
On Mon, 26 Oct 2026 at 09:55, Raghavendra Ningoji
<raghavendra.ningoji at amd.com> wrote:
>
> This series adds support for the Non-Transparent Bridge (NTB) endpoints
> integrated in AMD EPYC Embedded "Turin", "Genoa" and "Siena" processors
> to the raw/ntb driver.
>
> The common NTB code validates the vendor ops once at probe time, and the
> vendor abstraction is built around a small set of mandatory ops instead
> of optional hooks with built-in fallbacks:
>
> - Patch 1 is a preparation commit that enforces the vendor ops once, at
> probe time, and removes the per-call NULL checks that are scattered
> throughout the common code.
>
> - Patch 2 generalizes the framework for multiple vendors. The link
> bring-up/tear-down is now expressed through mandatory ops
> (dev_handshake, peer_mw_validate, read_peer_config, link_cleanup); the
> former built-in scratchpad logic moved into the Intel driver. The
> mw_set_trans op is gone (it is now a vendor-internal concern of the
> handshake), and there is a single common interrupt handler with just
> one optional op (handle_hw_event) for vendor-specific hardware events.
>
> - Patch 3 adds the AMD hardware driver, its documentation, release note
> and MAINTAINERS entry.
>
> A few AMD-specific hardware details worth noting for reviewers:
>
> - Primary/secondary topology. One endpoint enumerates as the primary
> (device ID 0x14c0) and the other as the secondary (0x14c3), rather
> than the Intel back-to-back model.
>
> - Packed scratchpad handshake. The hardware exposes a single shared
> 16-register scratchpad bank split into two disjoint 8-register sets
> (one per side), so the driver uses a packed handshake layout that
> fits in 8 registers, plugged in through the dev_handshake,
> peer_mw_validate and read_peer_config ops.
>
> - Outbound translation window. AMD NTB uses an outbound translation
> window: a write to a BARxx memory-window offset is forwarded to
> (xlat_base | offset) in the peer's memory rather than
> (xlat_base + offset). The translation base must therefore be aligned
> to a power of two >= the window length so that no offset bit collides
> with a set bit in the base. This is reported to applications through
> the rte_pmd_ntb_get_mem_align() API and honoured by the ntb example
> when reserving the memory window memzone.
>
> - Secondary-side link status. On the secondary side the device's own
> PCIe link status does not reflect the true inter-host link, so the
> speed and width are read from the upstream switch port via sysfs.
>
> Tested on a two-node setup (primary + secondary EPYC Embedded hosts)
> with the dpdk-ntb example: the link comes up at the expected speed and
> width on both sides, and file transfers are byte-correct end to end for
> both small and large files.
>
> Changes since v3:
>
> - Simplified the probe-time vendor ops check (patch 1) to a plain
> per-member macro instead of an offsetof() table.
>
> - Removed the mw_size_align field from struct ntb_dev_info entirely
> (patch 2): applications must now use rte_pmd_ntb_get_mem_align(). This
> is documented in the API changes section of the release notes.
>
> - Removed the unused pmd_private field from struct ntb_hw and the whole
> struct amd_ntb_hw (patch 3): self_mmio is just ntb->hw_addr, peer_mmio
> becomes AMD_PEER_MMIO(ntb), the scratchpad offsets become an
> AMD_SPAD_BASE(ntb, peer) macro, and int_mask/peer_status/ctl_status
> were unused.
>
> - Sorted AMD alphabetically before Intel in meson.build, the ntb_hw
> header include, the PCI id mapping table and usertools/dpdk-devbind.py.
>
> - Moved the primary/secondary topology definitions (NTB_TOPO_PRI/SEC)
> from patch 2 to patch 3 where they are first used.
>
> - Updated the Limitation section of doc/guides/rawdevs/ntb.rst to list
> the supported AMD processors.
- "external" build was broken for the example as spotted by the CI.
https://github.com/ovsrobot/dpdk/actions/runs/40296962846/job/121485246438
This is a known limitation of the .pc provided by DPDK (which Robin
recently tried to fix).
I tested and squashed a simple fix:
https://github.com/david-marchand/dpdk/commit/16b0d741ebf39b22ebb696c07f2ed44ad383bfc9
- Some commitlogs were not updated after the v4 changes, fixed.
- Some strange indentation issues were still there, fixed.
With all those fixes applied, I pushed this driver update.
Thanks.
--
David Marchand
More information about the dev
mailing list