[PATCH 0/4] raw/ntb: AMD NTB support
Raghavendra Ningoji
raghavendra.ningoji at amd.com
Wed Nov 4 12:26:12 CET 2026
Hi David, Stephen,
Thanks for the review. All the warnings were confirmed, except the
memory window size check, see below. The fixes are sent as a separate
series: "[PATCH 00/13] raw/ntb: post-merge fixes".
- rte_pmd_ntb_get_mem_align() trusting any rawdev id: fixed, the device
must be valid and use the NTB ops, and an out of range mw_id now
returns 0 (patch 1).
- peer_used_mws overflowing peer_mw_base[]: fixed for both AMD and
Intel (the Intel scratchpad value was also truncated) (patch 2).
- ioremap range check off by one: fixed for both vendors (patch 3).
- mw_size never freed: fixed, together with peer_mw_base which was
also leaked on each start/stop cycle (patch 4).
- Doorbell interrupts with vfio-pci: earlier verified with uio and going forward
vfio-pci support added.The handler is now registered on each
doorbell eventfd; with it, the DB1/DB2 exchange on stop completes
(patch 5). This also affected Intel with vfio-pci.
- Hardware events never delivered, and the switch on a bitmask: the
AMD hardware event handling is removed, together with the
handle_hw_event op and the unused definitions, and ntb.rst now says
hardware events are not handled (patch 7). It can be added back
properly later, with the event vectors and INTMASK wired up.
- Rx EOP guard leaking the partial chain: fixed as a separate patch
for stable. A packet is only taken once all its descriptors are
published by the peer, and its refill mbufs are allocated before it
is consumed, so the ring indexes only move for complete packets
(patch 8). While there, I found that the Rx mbuf handed to the
application stayed referenced in the software ring and was freed
again on device stop (patch 9).
- ABI changes note, examples Makefile, unused defines and the IOVA
as VA note for large windows: done (patches 10-13).
- Window size check in amd_ntb_peer_mw_validate(): not added. The AMD
handshake already uses all the scratchpad registers of a side (the
last two being reserved for applications), so passing the sizes would
require changing the handshake layout. On the other hand,
amd_ntb_mw_set_trans() programs the window limit register with the
local memzone length, so the hardware already bounds what the peer
can reach.
Thanks,
Raghavendra
More information about the dev
mailing list