drivers: use vdev registration
[dpdk.git] / drivers / net / pcap / rte_eth_pcap.c
index 1bcd7e5..8c7f6eb 100644 (file)
@@ -40,7 +40,7 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
-#include <rte_dev.h>
+#include <rte_vdev.h>
 
 #include <net/if.h>
 
@@ -822,7 +822,7 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues,
                goto error;
 
        /* reserve an ethdev entry */
-       *eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL);
+       *eth_dev = rte_eth_dev_allocate(name);
        if (*eth_dev == NULL)
                goto error;
 
@@ -1083,12 +1083,18 @@ rte_pmd_pcap_devuninit(const char *name)
        return 0;
 }
 
-static struct rte_driver pmd_pcap_drv = {
-       .type = PMD_VDEV,
+static struct rte_vdev_driver pmd_pcap_drv = {
+       .driver = {
+               .type = PMD_VDEV,
+       },
        .init = rte_pmd_pcap_devinit,
        .uninit = rte_pmd_pcap_devuninit,
 };
 
-PMD_REGISTER_DRIVER(pmd_pcap_drv, eth_pcap);
-DRIVER_REGISTER_PARAM_STRING(eth_pcap, "rx_pcap=<string> tx_pcap=<string> "
-"rx_iface=<ifc> tx_iface=<ifc> iface=<ifc>");
+DRIVER_REGISTER_VDEV(net_pcap, pmd_pcap_drv);
+DRIVER_REGISTER_PARAM_STRING(net_pcap,
+       "rx_pcap=<string> "
+       "tx_pcap=<string> "
+       "rx_iface=<ifc> "
+       "tx_iface=<ifc> "
+       "iface=<ifc>");