From: Jan Viktorin <viktorin@rehivetech.com>
To: dev@dpdk.org
Cc: Jan Viktorin <viktorin@rehivetech.com>,
Thomas Monjalon <thomas.monjalon@6wind.com>,
david.marchand@6wind.com
Subject: [dpdk-dev] [PATCH] app/test: remove rte_pci_dev_ids.h from pci_autotest
Date: Tue, 14 Jun 2016 15:46:21 +0200 [thread overview]
Message-ID: <1465911981-26372-1-git-send-email-viktorin@rehivetech.com> (raw)
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.
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
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
diff --git a/app/test/test_pci.c b/app/test/test_pci.c
index 8051e53..354a0ad 100644
--- a/app/test/test_pci.c
+++ b/app/test/test_pci.c
@@ -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 = {
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/device b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/device
index 9e4789e..48a6290 100644
--- a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/device
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/device
@@ -1 +1 @@
-0x10fb
+0x1234
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/subsystem_vendor b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/subsystem_vendor
index ce6dc4d..446afb4 100644
--- a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/subsystem_vendor
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/subsystem_vendor
@@ -1 +1 @@
-0x8086
+0x0001
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/vendor b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/vendor
index ce6dc4d..446afb4 100644
--- a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/vendor
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:00.0/vendor
@@ -1 +1 @@
-0x8086
+0x0001
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/device b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/device
new file mode 100644
index 0000000..f61bbe6
--- /dev/null
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/device
@@ -0,0 +1 @@
+0xabcd
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/resource b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/resource
new file mode 100644
index 0000000..f388929
--- /dev/null
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/resource
@@ -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
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/subsystem_device b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/subsystem_device
new file mode 100644
index 0000000..f61bbe6
--- /dev/null
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/subsystem_device
@@ -0,0 +1 @@
+0xabcd
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/subsystem_vendor b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/subsystem_vendor
new file mode 100644
index 0000000..4321b81
--- /dev/null
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/subsystem_vendor
@@ -0,0 +1 @@
+0x0002
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/vendor b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/vendor
new file mode 100644
index 0000000..4321b81
--- /dev/null
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:01:02.0/vendor
@@ -0,0 +1 @@
+0x0002
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/device b/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/device
new file mode 100644
index 0000000..ccaa498
--- /dev/null
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/device
@@ -0,0 +1 @@
+0x4444
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/resource b/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/resource
new file mode 100644
index 0000000..f388929
--- /dev/null
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/resource
@@ -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
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/subsystem_device b/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/subsystem_device
new file mode 100644
index 0000000..ccaa498
--- /dev/null
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/subsystem_device
@@ -0,0 +1 @@
+0x4444
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/subsystem_vendor b/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/subsystem_vendor
new file mode 100644
index 0000000..446afb4
--- /dev/null
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/subsystem_vendor
@@ -0,0 +1 @@
+0x0001
diff --git a/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/vendor b/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/vendor
new file mode 100644
index 0000000..446afb4
--- /dev/null
+++ b/app/test/test_pci_sysfs/bus/pci/devices/0000:02:ab.0/vendor
@@ -0,0 +1 @@
+0x0001
--
2.8.0
next reply other threads:[~2016-06-14 13:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 13:46 Jan Viktorin [this message]
2016-06-14 14:08 ` Thomas Monjalon
2016-06-15 9:51 ` Jan Viktorin
2016-06-15 13:54 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465911981-26372-1-git-send-email-viktorin@rehivetech.com \
--to=viktorin@rehivetech.com \
--cc=david.marchand@6wind.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).