#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>
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;
return 0;
}
-static struct rte_driver pmd_pcap_drv = {
- .name = "eth_pcap",
- .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);
+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>");