[PATCH v1] net/idpf: add IDPF PCI class ID support
David Marchand
david.marchand at redhat.com
Tue Sep 23 08:52:18 CEST 2025
Hello,
On Mon, 22 Sept 2025 at 18:36, Singh, Aman Deep
<aman.deep.singh at intel.com> wrote:
> 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.
>
> Yes David, it only applies to IDPF. As per PCI document-
>
> https://members.pcisig.com/document/20113 Table: 1.3
I'll trust you, as I don't have access.
>
> Is it OK to rename it: IDPF_PCI_CLASS ?
Ok for me.
Thank you.
--
David Marchand
More information about the dev
mailing list