| 587 | } |
| 588 | |
| 589 | static uint64_t |
| 590 | count_packets_in_pcap(pcap_t **pcap, struct pcap_rx_queue *pcap_q) |
| 591 | { |
| 592 | const u_char *packet; |
| 593 | struct pcap_pkthdr header; |
| 594 | uint64_t pcap_pkt_count = 0; |
| 595 | |
| 596 | while ((packet = pcap_next(*pcap, &header))) |
| 597 | pcap_pkt_count++; |
| 598 | |
| 599 | /* The pcap is reopened so it can be used as normal later. */ |
| 600 | pcap_close(*pcap); |
| 601 | *pcap = NULL; |
| 602 | open_single_rx_pcap(pcap_q->name, pcap); |
| 603 | |
| 604 | return pcap_pkt_count; |
| 605 | } |
| 606 | |
| 607 | static int |
| 608 | eth_dev_start(struct rte_eth_dev *dev) |
no test coverage detected