ethdev: get rid of device type
[dpdk.git] / drivers / net / pcap / rte_eth_pcap.c
index c98e234..418fc52 100644 (file)
@@ -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;
 
@@ -978,8 +978,8 @@ rte_pmd_pcap_devinit(const char *name, const char *params)
        unsigned numa_node, using_dumpers = 0;
        int ret;
        struct rte_kvargs *kvlist;
-       struct rx_pcaps pcaps;
-       struct tx_pcaps dumpers;
+       struct rx_pcaps pcaps = {0};
+       struct tx_pcaps dumpers = {0};
 
        RTE_LOG(INFO, PMD, "Initializing pmd_pcap for %s\n", name);
 
@@ -1084,10 +1084,15 @@ rte_pmd_pcap_devuninit(const char *name)
 }
 
 static struct rte_driver pmd_pcap_drv = {
-       .name = "eth_pcap",
        .type = PMD_VDEV,
        .init = rte_pmd_pcap_devinit,
        .uninit = rte_pmd_pcap_devuninit,
 };
 
-PMD_REGISTER_DRIVER(pmd_pcap_drv);
+PMD_REGISTER_DRIVER(pmd_pcap_drv, net_pcap);
+DRIVER_REGISTER_PARAM_STRING(net_pcap,
+       "rx_pcap=<string> "
+       "tx_pcap=<string> "
+       "rx_iface=<ifc> "
+       "tx_iface=<ifc> "
+       "iface=<ifc>");