app/test: remove rte_pci_dev_ids.h from pci_autotest
PATCH 1/1 app/test: remove rte_pci_dev_ids.h from pci_autotest
There are 2 new fake devices for testing PCI infra. All the fake devices are now identified by non-existing vendor and device IDs so there is no real driver to bind to them. The testing drivers match those IDs.
--- app/test/test_pci.c | 17 +++++------------ .../test_pci_sysfs/bus/pci/devices/0000:01:00.0/device | 2 +- .../bus/pci/devices/0000:01:00.0/subsystem_vendor | 2 +- .../test_pci_sysfs/bus/pci/devices/0000:01:00.0/vendor | 2 +- .../test_pci_sysfs/bus/pci/devices/0000:01:02.0/device | 1 + .../bus/pci/devices/0000:01:02.0/resource | 13 +++++++++++++ .../bus/pci/devices/0000:01:02.0/subsystem_device | 1 + .../bus/pci/devices/0000:01:02.0/subsystem_vendor | 1 + .../test_pci_sysfs/bus/pci/devices/0000:01:02.0/vendor | 1 + .../test_pci_sysfs/bus/pci/devices/0000:02:ab.0/device | 1 + .../bus/pci/devices/0000:02:ab.0/resource | 13 +++++++++++++ .../bus/pci/devices/0000:02:ab.0/subsystem_device | 1 + .../bus/pci/devices/0000:02:ab.0/subsystem_vendor | 1 + .../test_pci_sysfs/bus/pci/devices/0000:02:ab.0/vendor | 1 + 14 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/device create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/resource create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/subsystem_device create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/subsystem_vendor create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/vendor create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/device create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/resource create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/subsystem_device create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/subsystem_vendor create mode 100644 app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/vendor
app/test/test_pci.c +5 -12
@@ -67,21 +67,14 @@ static int my_driver_init(struct rte_pci_driver *dr,/* IXGBE NICS */ struct rte_pci_id my_driver_id[] = { - -#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include <rte_pci_dev_ids.h> - -{ .vendor_id =0 ,/* sentinel */ }, + {RTE_PCI_DEVICE (0x0001 ,0x1234 )}, + { .vendor_id =0 ,/* sentinel */ }, };struct rte_pci_id my_driver_id2[] = { - -/* IGB & EM NICS */ -#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, -#include <rte_pci_dev_ids.h> - -{ .vendor_id =0 ,/* sentinel */ }, + {RTE_PCI_DEVICE (0x0001 ,0x4444 )}, + {RTE_PCI_DEVICE (0x0002 ,0xabcd )}, + { .vendor_id =0 ,/* sentinel */ }, };struct rte_pci_driver my_driver = {
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/device +1 -1
@@ -1 +1 @@ -0x10fb +0x1234
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/subsystem_vendor +1 -1
@@ -1 +1 @@ -0x8086 +0x0001
app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/vendor +1 -1
@@ -1 +1 @@ -0x8086 +0x0001
app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/device new file +1 -0
@@ -0,0 +1 @@ +0xabcd
app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/resource new file +13 -0
@@ -0,0 +1,13 @@ +0x00000000d0080000 0x00000000d00fffff 0x000000000014220c +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x000000000000e020 0x000000000000e03f 0x0000000000040101 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x00000000d0104000 0x00000000d0107fff 0x000000000014220c +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x00000000ab000000 0x00000000ab0fffff 0x0000000000140204 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x00000000ab100000 0x00000000ab1fffff 0x0000000000140204 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000
app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/subsystem_device new file +1 -0
@@ -0,0 +1 @@ +0xabcd
app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/subsystem_vendor new file +1 -0
@@ -0,0 +1 @@ +0x0002
app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/vendor new file +1 -0
@@ -0,0 +1 @@ +0x0002
app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/device new file +1 -0
@@ -0,0 +1 @@ +0x4444
app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/resource new file +13 -0
@@ -0,0 +1,13 @@ +0x00000000d0080000 0x00000000d00fffff 0x000000000014220c +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x000000000000e020 0x000000000000e03f 0x0000000000040101 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x00000000d0104000 0x00000000d0107fff 0x000000000014220c +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x00000000ab000000 0x00000000ab0fffff 0x0000000000140204 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x00000000ab100000 0x00000000ab1fffff 0x0000000000140204 +0x0000000000000000 0x0000000000000000 0x0000000000000000 +0x0000000000000000 0x0000000000000000 0x0000000000000000
app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/subsystem_device new file +1 -0
@@ -0,0 +1 @@ +0x4444
app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/subsystem_vendor new file +1 -0
@@ -0,0 +1 @@ +0x0001
app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/vendor new file +1 -0
@@ -0,0 +1 @@ +0x0001
Signature · 1 line
2.8.0
2016-06-14 15:46, Jan Viktorin:
Quoted 3 lines
There are 2 new fake devices for testing PCI infra. All the fake devices are now identified by non-existing vendor and device IDs so there is no real driver to bind to them. The testing drivers match those IDs.
Why not removing the existing sysfs entries faking real devices? Thanks
Quoted 2 lines · On Tue, 14 Jun 2016 16:08:42 +0200 Thomas Monjalon <[email protected]>…
2016-06-14 15:46, Jan Viktorin:
Quoted 1 line
There are 2 new fake devices for testing PCI infra. All the fake devices
s/All the fake/All 3 fake/
Quoted 4 lines
Quoted 2 lines
are now identified by non-existing vendor and device IDs so there is no real driver to bind to them. The testing drivers match those IDs.
Why not removing the existing sysfs entries faking real devices?
There is no reason to remove anything. All 3 devices are fakes. The original one was changed to have fake IDs.
Is it more clear now?
Jan
Quoted 1 line
Thanks
Thomas Monjalon
Applied2016-06-15 11:51, Jan Viktorin:
Quoted 11 lines
Quoted 2 lines · On Tue, 14 Jun 2016 16:08:42 +0200 Thomas Monjalon <[email protected]>…
2016-06-14 15:46, Jan Viktorin:
Quoted 1 line
There are 2 new fake devices for testing PCI infra. All the fake devices
s/All the fake/All 3 fake/
Quoted 3 lines
Quoted 2 lines
are now identified by non-existing vendor and device IDs so there is no real driver to bind to them. The testing drivers match those IDs.
Quoted 6 lines
Quoted 1 line
Why not removing the existing sysfs entries faking real devices?
There is no reason to remove anything. All 3 devices are fakes. The original one was changed to have fake IDs.
Is it more clear now?
Got it.
Applied, thanks