vdpa/ifc: add PCI ID for legacy network device

Add new device id to support IFCVF_NET_TRANSITIONAL_DEVICE_ID (0x1000).
Rename macro from "IFCVF_BLK_DEVICE_ID" to "IFCVF_SUBSYS_BLK_DEVICE_ID".

Signed-off-by: Huang Wei <wei.huang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
Huang Wei 2022-10-19 16:41:13 +08:00 committed by Chenbo Xia
parent 578e37908d
commit 5c806b9478
2 changed files with 14 additions and 5 deletions

View File

@ -12,12 +12,14 @@
#define IFCVF_BLK 1 #define IFCVF_BLK 1
#define IFCVF_VENDOR_ID 0x1AF4 #define IFCVF_VENDOR_ID 0x1AF4
#define IFCVF_NET_DEVICE_ID 0x1041 #define IFCVF_NET_MODERN_DEVICE_ID 0x1041
#define IFCVF_BLK_MODERN_DEVICE_ID 0x1042 #define IFCVF_BLK_MODERN_DEVICE_ID 0x1042
#define IFCVF_NET_TRANSITIONAL_DEVICE_ID 0x1000
#define IFCVF_BLK_TRANSITIONAL_DEVICE_ID 0x1001 #define IFCVF_BLK_TRANSITIONAL_DEVICE_ID 0x1001
#define IFCVF_SUBSYS_VENDOR_ID 0x8086 #define IFCVF_SUBSYS_VENDOR_ID 0x8086
#define IFCVF_SUBSYS_DEVICE_ID 0x001A #define IFCVF_SUBSYS_DEVICE_ID 0x001A
#define IFCVF_BLK_DEVICE_ID 0x0002 #define IFCVF_SUBSYS_NET_DEVICE_ID 0x0001
#define IFCVF_SUBSYS_BLK_DEVICE_ID 0x0002
#define IFCVF_MAX_QUEUES 1 #define IFCVF_MAX_QUEUES 1

View File

@ -1684,23 +1684,30 @@ ifcvf_pci_remove(struct rte_pci_device *pci_dev)
static const struct rte_pci_id pci_id_ifcvf_map[] = { static const struct rte_pci_id pci_id_ifcvf_map[] = {
{ .class_id = RTE_CLASS_ANY_ID, { .class_id = RTE_CLASS_ANY_ID,
.vendor_id = IFCVF_VENDOR_ID, .vendor_id = IFCVF_VENDOR_ID,
.device_id = IFCVF_NET_DEVICE_ID, .device_id = IFCVF_NET_MODERN_DEVICE_ID,
.subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID, .subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID,
.subsystem_device_id = IFCVF_SUBSYS_DEVICE_ID, .subsystem_device_id = IFCVF_SUBSYS_DEVICE_ID,
}, },
{ .class_id = RTE_CLASS_ANY_ID,
.vendor_id = IFCVF_VENDOR_ID,
.device_id = IFCVF_NET_TRANSITIONAL_DEVICE_ID,
.subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID,
.subsystem_device_id = IFCVF_SUBSYS_NET_DEVICE_ID,
},
{ .class_id = RTE_CLASS_ANY_ID, { .class_id = RTE_CLASS_ANY_ID,
.vendor_id = IFCVF_VENDOR_ID, .vendor_id = IFCVF_VENDOR_ID,
.device_id = IFCVF_BLK_TRANSITIONAL_DEVICE_ID, .device_id = IFCVF_BLK_TRANSITIONAL_DEVICE_ID,
.subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID, .subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID,
.subsystem_device_id = IFCVF_BLK_DEVICE_ID, .subsystem_device_id = IFCVF_SUBSYS_BLK_DEVICE_ID,
}, },
{ .class_id = RTE_CLASS_ANY_ID, { .class_id = RTE_CLASS_ANY_ID,
.vendor_id = IFCVF_VENDOR_ID, .vendor_id = IFCVF_VENDOR_ID,
.device_id = IFCVF_BLK_MODERN_DEVICE_ID, .device_id = IFCVF_BLK_MODERN_DEVICE_ID,
.subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID, .subsystem_vendor_id = IFCVF_SUBSYS_VENDOR_ID,
.subsystem_device_id = IFCVF_BLK_DEVICE_ID, .subsystem_device_id = IFCVF_SUBSYS_BLK_DEVICE_ID,
}, },
{ .vendor_id = 0, /* sentinel */ { .vendor_id = 0, /* sentinel */