[PATCH v1] net/idpf: add IDPF PCI class ID support
David Marchand
david.marchand at redhat.com
Mon Sep 22 14:09:07 CEST 2025
Hello,
On Mon, 22 Sept 2025 at 08:35, Vemula Venkatesh
<venkatesh.vemula at intel.com> wrote:
> diff --git a/drivers/net/intel/idpf/idpf_common_device.h b/drivers/net/intel/idpf/idpf_common_device.h
> index 5f3e4a4fcf..9d1d7dc47c 100644
> --- a/drivers/net/intel/idpf/idpf_common_device.h
> +++ b/drivers/net/intel/idpf/idpf_common_device.h
> @@ -44,6 +44,23 @@
> (sizeof(struct virtchnl2_ptype) + \
> (((p)->proto_id_count ? ((p)->proto_id_count - 1) : 0) * sizeof((p)->proto_id[0])))
>
> +/** Macro used to help building up tables of device IDs with PCI class */
> +#define RTE_PCI_CLASS(cls) \
> + .class_id = (cls), \
> + .vendor_id = RTE_PCI_ANY_ID, \
> + .device_id = RTE_PCI_ANY_ID, \
> + .subsystem_vendor_id = RTE_PCI_ANY_ID, \
> + .subsystem_device_id = RTE_PCI_ANY_ID
Don't define a macro with the RTE_PCI_ namespace in a driver.
Either this is really specific to IDPF, and this should be renamed
with a prefix reflecting this.
This macro is a huge wildcard on a pci class, which seems very specific.
Or this makes sense for other drivers and then this macro should be
moved to the pci bus driver header.
--
David Marchand
More information about the dev
mailing list