[PATCH v1] net/idpf: add IDPF PCI class ID support

Singh, Aman Deep aman.deep.singh at intel.com
Mon Sep 22 18:35:19 CEST 2025


On 22-09-2025 17:39, David Marchand wrote:
> 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.

Yes David, it only applies to IDPF. As per PCI document-

  https://members.pcisig.com/document/20113 Table: 1.3

Is it OK to rename it: IDPF_PCI_CLASS ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20250922/afefad4f/attachment-0001.htm>


More information about the dev mailing list