X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fpcap%2Frte_eth_pcap.c;h=7f0b650052fcc1c4a03e31c10a99e50e483eeb89;hb=0002ca582de3fb397f8c606b4857d44fd266864a;hp=69c696048acb88309f60f5663925ee5baf2c28ba;hpb=d857736110e507eb3864698bbe271908e2875b95;p=dpdk.git diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 69c696048a..7f0b650052 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -246,7 +246,7 @@ calculate_timestamp(struct timeval *ts) { cycles = rte_get_timer_cycles() - start_cycles; cur_time.tv_sec = cycles / hz; - cur_time.tv_usec = (cycles % hz) * 10e6 / hz; + cur_time.tv_usec = (cycles % hz) * 1e6 / hz; timeradd(&start_time, &cur_time, ts); } @@ -787,6 +787,8 @@ open_tx_iface(const char *key, const char *value, void *extra_args) return 0; } +static struct rte_vdev_driver pmd_pcap_drv; + static int pmd_init_internals(const char *name, const unsigned int nb_rx_queues, const unsigned int nb_tx_queues, @@ -839,7 +841,7 @@ pmd_init_internals(const char *name, const unsigned int nb_rx_queues, (*eth_dev)->driver = NULL; data->dev_flags = RTE_ETH_DEV_DETACHABLE; data->kdrv = RTE_KDRV_NONE; - data->drv_name = "Pcap PMD"; + data->drv_name = pmd_pcap_drv.driver.name; data->numa_node = numa_node; return 0;