drivers: rename register macro prefix
[dpdk.git] / drivers / net / ring / rte_eth_ring.c
index b1783c3..ee1fb76 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;
@@ -505,7 +505,7 @@ out:
 }
 
 static int
-rte_pmd_ring_devinit(const char *name, const char *params)
+rte_pmd_ring_probe(const char *name, const char *params)
 {
        struct rte_kvargs *kvlist = NULL;
        int ret = 0;
@@ -557,7 +557,7 @@ rte_pmd_ring_devinit(const char *name, const char *params)
                                goto out_free;
 
                        for (info->count = 0; info->count < info->total; info->count++) {
-                               ret = eth_dev_ring_create(name,
+                               ret = eth_dev_ring_create(info->list[info->count].name,
                                                          info->list[info->count].node,
                                                          info->list[info->count].action);
                                if ((ret == -1) &&
@@ -580,7 +580,7 @@ out_free:
 }
 
 static int
-rte_pmd_ring_devuninit(const char *name)
+rte_pmd_ring_remove(const char *name)
 {
        struct rte_eth_dev *eth_dev = NULL;
        struct pmd_internals *internals = NULL;
@@ -623,11 +623,11 @@ rte_pmd_ring_devuninit(const char *name)
        return 0;
 }
 
-static struct rte_driver pmd_ring_drv = {
-       .name = "eth_ring",
-       .type = PMD_VDEV,
-       .init = rte_pmd_ring_devinit,
-       .uninit = rte_pmd_ring_devuninit,
+static struct rte_vdev_driver pmd_ring_drv = {
+       .probe = rte_pmd_ring_probe,
+       .remove = rte_pmd_ring_remove,
 };
 
-PMD_REGISTER_DRIVER(pmd_ring_drv);
+RTE_PMD_REGISTER_VDEV(net_ring, pmd_ring_drv);
+RTE_PMD_REGISTER_PARAM_STRING(net_ring,
+       ETH_RING_NUMA_NODE_ACTION_ARG "=name:node:action(ATTACH|CREATE)");