drivers: use vdev registration
[dpdk.git] / drivers / net / ring / rte_eth_ring.c
index f2f5217..9cdeb51 100644 (file)
@@ -38,7 +38,7 @@
 #include <rte_memcpy.h>
 #include <rte_memzone.h>
 #include <rte_string_fns.h>
-#include <rte_dev.h>
+#include <rte_vdev.h>
 #include <rte_kvargs.h>
 #include <rte_errno.h>
 
@@ -303,7 +303,7 @@ do_eth_dev_ring_create(const char *name,
        }
 
        /* 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) {
                rte_errno = ENOSPC;
                goto error;
@@ -623,12 +623,14 @@ rte_pmd_ring_devuninit(const char *name)
        return 0;
 }
 
-static struct rte_driver pmd_ring_drv = {
-       .name = "eth_ring",
-       .type = PMD_VDEV,
+static struct rte_vdev_driver pmd_ring_drv = {
+       .driver = {
+               .type = PMD_VDEV,
+       },
        .init = rte_pmd_ring_devinit,
        .uninit = rte_pmd_ring_devuninit,
 };
 
-PMD_REGISTER_DRIVER(pmd_ring_drv, eth_ring);
-DRIVER_REGISTER_PARAM_STRING(eth_ring, "nodeaction=[attach|detach]");
+DRIVER_REGISTER_VDEV(net_ring, pmd_ring_drv);
+DRIVER_REGISTER_PARAM_STRING(net_ring,
+       "nodeaction=[attach|detach]");