net: align ethdev and eal driver names
[dpdk.git] / drivers / net / xenvirt / rte_eth_xenvirt.c
index 5a897b9..19bc09a 100644 (file)
@@ -70,8 +70,6 @@
 /* virtio_idx is increased after new device is created.*/
 static int virtio_idx = 0;
 
-static const char *drivername = "xen virtio PMD";
-
 static struct rte_eth_link pmd_link = {
                .link_speed = ETH_SPEED_NUM_10G,
                .link_duplex = ETH_LINK_FULL_DUPLEX,
@@ -331,13 +329,11 @@ eth_dev_info(struct rte_eth_dev *dev,
        struct pmd_internals *internals = dev->data->dev_private;
 
        RTE_SET_USED(internals);
-       dev_info->driver_name = drivername;
        dev_info->max_mac_addrs = 1;
        dev_info->max_rx_pktlen = (uint32_t)2048;
        dev_info->max_rx_queues = (uint16_t)1;
        dev_info->max_tx_queues = (uint16_t)1;
        dev_info->min_rx_bufsize = 0;
-       dev_info->pci_dev = NULL;
 }
 
 static void
@@ -620,6 +616,7 @@ enum dev_action {
        DEV_ATTACH
 };
 
+static struct rte_vdev_driver pmd_xenvirt_drv;
 
 static int
 eth_dev_xenvirt_create(const char *name, const char *params,
@@ -673,9 +670,9 @@ eth_dev_xenvirt_create(const char *name, const char *params,
        eth_dev->data = data;
        eth_dev->dev_ops = &ops;
 
-       eth_dev->data->dev_flags = RTE_PCI_DRV_DETACHABLE;
+       eth_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE;
        eth_dev->data->kdrv = RTE_KDRV_NONE;
-       eth_dev->data->drv_name = drivername;
+       eth_dev->data->drv_name = pmd_xenvirt_drv.driver.name;
        eth_dev->driver = NULL;
        eth_dev->data->numa_node = numa_node;
 
@@ -765,5 +762,6 @@ static struct rte_vdev_driver pmd_xenvirt_drv = {
 };
 
 RTE_PMD_REGISTER_VDEV(net_xenvirt, pmd_xenvirt_drv);
+RTE_PMD_REGISTER_ALIAS(net_xenvirt, eth_xenvirt);
 RTE_PMD_REGISTER_PARAM_STRING(net_xenvirt,
        "mac=<mac addr>");