On 9/16/22 08:16, Andy Pei wrote:
From: Huang Wei <wei.hu...@intel.com>
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.hu...@intel.com>
Signed-off-by: Andy Pei <andy....@intel.com>
---
drivers/vdpa/ifc/base/ifcvf.h | 6 ++++--
drivers/vdpa/ifc/ifcvf_vdpa.c | 13 ++++++++++---
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.h
index 9d95aac..ef7697a 100644
--- a/drivers/vdpa/ifc/base/ifcvf.h
+++ b/drivers/vdpa/ifc/base/ifcvf.h
@@ -12,12 +12,14 @@
#define IFCVF_BLK 1
#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_NET_TRANSITIONAL_DEVICE_ID 0x1000
#define IFCVF_BLK_TRANSITIONAL_DEVICE_ID 0x1001
#define IFCVF_SUBSYS_VENDOR_ID 0x8086
#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
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index ac42de9..07cc63d 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -1684,23 +1684,30 @@ struct rte_vdpa_dev_info dev_info[] = {
static const struct rte_pci_id pci_id_ifcvf_map[] = {
{ .class_id = RTE_CLASS_ANY_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_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,
+ .vendor_id = IFCVF_VENDOR_ID,
.device_id = IFCVF_BLK_TRANSITIONAL_DEVICE_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,
.vendor_id = IFCVF_VENDOR_ID,
.device_id = IFCVF_BLK_MODERN_DEVICE_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 */
Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com>
Thanks,
Maxime