app/test: rework command registration
[dpdk.git] / app / test / test_pci.c
index 8051e53..69f78d9 100644 (file)
@@ -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 = {
@@ -322,8 +315,4 @@ test_pci(void)
        return 0;
 }
 
-static struct test_command pci_cmd = {
-       .command = "pci_autotest",
-       .callback = test_pci,
-};
-REGISTER_TEST_COMMAND(pci_cmd);
+REGISTER_TEST_COMMAND(pci_autotest, test_pci);