DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/1] bus/pci: add RTE_PCI_DRV_NEED_IOVA_AS_PA flag
@ 2026-10-10  9:25 liujie5
  2026-10-10  9:25 ` [PATCH v1 1/1] " liujie5
  0 siblings, 1 reply; 57+ messages in thread
From: liujie5 @ 2026-10-10  9:25 UTC (permalink / raw)
  To: stephen; +Cc: dev, liufeng1

From: liufeng1 <liufeng1@sugon.com>

This series adds a new PCI driver flag, RTE_PCI_DRV_NEED_IOVA_AS_PA,
which allows a PCI driver to tell the PCI bus layer that it cannot work
with IOVA as VA and must use IOVA as PA.

The existing RTE_PCI_DRV_NEED_IOVA_AS_VA flag already provides the
opposite requirement. Some PCI devices, however, are managed by a kernel
driver that uses an identity-mapped IOMMU domain (e.g. when the kernel
is booted with iommu=pt). The user-space PMD for such devices must use
IOVA as PA, because the DMA addresses programmed by DPDK must match the
identity mapping programmed by the kernel driver.

Without this flag, a PCI driver bound to a non-VFIO/UIO kernel driver
has no way to force IOVA as PA. pci_device_iova_mode() returns
RTE_IOVA_DC for those devices, and rte_eal_init() then sees an enabled
IOMMU and selects RTE_IOVA_VA, which breaks identity-domain PMDs and
forces users to pass --iova-mode=pa on the command line.

When RTE_PCI_DRV_NEED_IOVA_AS_PA is set, pci_device_iova_mode() returns
RTE_IOVA_PA for the device. The requirement is propagated through
rte_pci_get_iommu_class() to rte_bus_get_iommu_class(), so
rte_eal_init() selects IOVA as PA automatically.

This is a generic mechanism: any PCI driver whose underlying kernel
driver uses an identity IOMMU domain can set the flag.

liufeng1 (1):
  bus/pci: add RTE_PCI_DRV_NEED_IOVA_AS_PA flag

 drivers/bus/pci/bus_pci_driver.h | 2 ++
 drivers/bus/pci/linux/pci.c      | 4 ++++
 drivers/bus/pci/pci_common.c     | 3 +--
 3 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2026-10-20 11:56 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <220260625133139.207632-1-liujie5@linkdatatechnology.com>
2026-06-26  6:38 ` [PATCH v9 00/23] net/sxe2: added Linkdata sxe2 ethernet driver liujie5
2026-06-26 18:18   ` Stephen Hemminger
2026-06-26  6:38 ` [PATCH v9 01/23] net/sxe2: remove software statistics devargs liujie5
2026-06-26  6:39 ` [PATCH v9 02/23] net/sxe2: add Rx framework and packet types callback liujie5
2026-06-26  6:39 ` [PATCH v9 03/23] net/sxe2: support AVX512 vectorized path for Rx and Tx liujie5
2026-06-26  6:40 ` [PATCH v9 04/23] net/sxe2: add AVX2 vector data " liujie5
2026-06-26  6:40 ` [PATCH v9 05/23] net/sxe2: add link update callback liujie5
2026-06-26  6:41 ` [PATCH v9 06/23] net/sxe2: support L2 filtering and MAC config liujie5
2026-06-26  6:41 ` [PATCH v9 07/23] drivers: support RSS feature liujie5
2026-06-26  6:42 ` [PATCH v9 08/23] net/sxe2: support TM hierarchy and shaping liujie5
2026-06-26  6:42 ` [PATCH v9 09/23] net/sxe2: support IPsec inline protocol offload liujie5
2026-06-26  6:43 ` [PATCH v9 10/23] net/sxe2: support statistics and multi-process liujie5
2026-06-26  6:43 ` [PATCH v9 11/23] drivers: interrupt handling liujie5
2026-06-26  6:44 ` [PATCH v9 12/23] net/sxe2: add NEON vec Rx/Tx burst functions liujie5
2026-06-26  6:44 ` [PATCH v9 13/23] drivers: add support for VF representors liujie5
2026-06-26  6:45 ` [PATCH v9 14/23] net/sxe2: add support for custom UDP tunnel ports liujie5
2026-06-26  6:45 ` [PATCH v9 15/23] net/sxe2: support firmware version reading liujie5
2026-06-26  6:46 ` [PATCH v9 16/23] net/sxe2: implement get monitor address liujie5
2026-06-26  6:46 ` [PATCH v9 17/23] common/sxe2: add shared SFP module definitions liujie5
2026-06-26  6:47 ` [PATCH v9 18/23] net/sxe2: support SFP module info and EEPROM access liujie5
2026-06-26  6:47 ` [PATCH v9 19/23] net/sxe2: add mbuf validation in Tx debug mode liujie5
2026-06-26 18:21   ` Stephen Hemminger
2026-06-27  4:00     ` liujie5
2026-06-26  6:48 ` [PATCH v9 20/23] common/sxe2: add callback for memory event handling liujie5
2026-06-26  6:48 ` [PATCH v9 21/23] net/sxe2: add private devargs parsing liujie5
2026-06-26  6:49 ` [PATCH v9 22/23] net/sxe2: implement private dump info liujie5
2026-06-26  6:49 ` [PATCH v9 23/23] net/sxe2: update sxe2 feature matrix docs liujie5
2026-06-27  4:04   ` [PATCH v10 00/23] et/sxe2: added Linkdata sxe2 ethernet driver liujie5
2026-06-29 19:02     ` Stephen Hemminger
2026-06-27  4:05   ` [PATCH v10 01/23] net/sxe2: remove software statistics devargs liujie5
2026-06-27  4:06   ` [PATCH v10 02/23] net/sxe2: add Rx framework and packet types callback liujie5
2026-06-27  4:06   ` [PATCH v10 03/23] net/sxe2: support AVX512 vectorized path for Rx and Tx liujie5
2026-06-27  4:07   ` [PATCH v10 04/23] net/sxe2: add AVX2 vector data " liujie5
2026-06-27  4:07   ` [PATCH v10 05/23] net/sxe2: add link update callback liujie5
2026-06-27  4:08   ` [PATCH v10 06/23] net/sxe2: support L2 filtering and MAC config liujie5
2026-06-27  4:08   ` [PATCH v10 07/23] drivers: support RSS feature liujie5
2026-06-27  4:09   ` [PATCH v10 08/23] net/sxe2: support TM hierarchy and shaping liujie5
2026-06-27  4:09   ` [PATCH v10 09/23] net/sxe2: support IPsec inline protocol offload liujie5
2026-06-27  4:10   ` [PATCH v10 10/23] net/sxe2: support statistics and multi-process liujie5
2026-06-27  4:10   ` [PATCH v10 11/23] drivers: interrupt handling liujie5
2026-06-27  4:11   ` [PATCH v10 12/23] net/sxe2: add NEON vec Rx/Tx burst functions liujie5
2026-06-27  4:11   ` [PATCH v10 13/23] drivers: add support for VF representors liujie5
2026-06-27  4:12   ` [PATCH v10 14/23] net/sxe2: add support for custom UDP tunnel ports liujie5
2026-06-27  4:12   ` [PATCH v10 15/23] net/sxe2: support firmware version reading liujie5
2026-06-27  4:13   ` [PATCH v10 16/23] net/sxe2: implement get monitor address liujie5
2026-06-27  4:13   ` [PATCH v10 17/23] common/sxe2: add shared SFP module definitions liujie5
2026-06-27  4:14   ` [PATCH v10 18/23] net/sxe2: support SFP module info and EEPROM access liujie5
2026-06-27  4:14   ` [PATCH v10 19/23] net/sxe2: add mbuf validation in Tx debug mode liujie5
2026-06-27  4:15   ` [PATCH v10 20/23] common/sxe2: add callback for memory event handling liujie5
2026-06-27  4:15   ` [PATCH v10 21/23] net/sxe2: add private devargs parsing liujie5
2026-06-27  4:16   ` [PATCH v10 22/23] net/sxe2: implement private dump info liujie5
2026-06-27  4:16   ` [PATCH v10 23/23] net/sxe2: update sxe2 feature matrix docs liujie5
2026-10-20 11:50   ` [PATCH v1 0/1] bus/pci: add RTE_PCI_DRV_NEED_IOVA_AS_PA flag liujie5
2026-10-20 11:50     ` [PATCH v1 1/1] " liujie5
     [not found]       ` <20261020115134.9048C12631E@dpdk.org>
2026-10-20 11:56         ` |WARNING| pw171747 " liujie5
2026-10-10  9:25 [PATCH v1 0/1] " liujie5
2026-10-10  9:25 ` [PATCH v1 1/1] " liujie5
2026-10-12  7:53   ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox