[PATCH v1 1/4] bus/pci: introduce PCIe TPH support

Stephen Hemminger stephen at networkplumber.org
Fri May 8 17:00:50 CEST 2026


On Fri, 8 May 2026 17:28:52 +0800
Chengwen Feng <fengchengwen at huawei.com> wrote:

> + * Used with VFIO_PCI_TPH_GET_CAP operation to return device
> + * TLP Processing Hints (TPH) capabilities to userspace.
> + */
> +struct vfio_pci_tph_cap {
> +	__u8  supported_modes;
> +#define VFIO_PCI_TPH_MODE_IV	(1u << 0) /* Interrupt vector */
> +#define VFIO_PCI_TPH_MODE_DS	(1u << 1) /* Device specific */

Use enum n

> +	__u8  reserved0;
> +	__u16 st_table_sz;
> +	__u32 reserved;
> +};

__u8, __u32 are kernel style types don't use in DPDK API's

I hate reserved fields. They don't do what you think and
create more problems. You end up having to enforce that reserved == 0
and 


More information about the dev mailing list