Lines Matching refs:pcap

59 	unsigned int pcap;  member
108 pcap_t *pcap; member
154 pcap_t *pcap = pp->rx_pcap[qid]; in queue_missed_stat_update() local
157 if (!pcap || (pcap_stats(pcap, &stat) != 0)) in queue_missed_stat_update()
161 if (stat.ps_drop < missed_stat->pcap) in queue_missed_stat_update()
163 missed_stat->pcap = stat.ps_drop; in queue_missed_stat_update()
174 missed_stat->mnemonic += missed_stat->pcap; in queue_missed_stat_on_stop_update()
175 missed_stat->pcap = 0; in queue_missed_stat_on_stop_update()
184 missed_stat->reset = missed_stat->pcap; in queue_missed_stat_reset()
194 return missed_stat->pcap + missed_stat->mnemonic - missed_stat->reset; in queue_missed_stat_get()
283 pcap_t *pcap; in eth_pcap_rx() local
286 pcap = pp->rx_pcap[pcap_q->queue_id]; in eth_pcap_rx()
288 if (unlikely(pcap == NULL || nb_pkts == 0)) in eth_pcap_rx()
296 packet = pcap_next(pcap, &header); in eth_pcap_rx()
469 pcap_t *pcap; in eth_pcap_tx() local
474 pcap = pp->tx_pcap[tx_queue->queue_id]; in eth_pcap_tx()
476 if (unlikely(nb_pkts == 0 || pcap == NULL)) in eth_pcap_tx()
495 ret = pcap_sendpacket(pcap, in eth_pcap_tx()
515 open_iface_live(const char *iface, pcap_t **pcap) { in open_iface_live() argument
516 *pcap = pcap_open_live(iface, RTE_ETH_PCAP_SNAPLEN, in open_iface_live()
519 if (*pcap == NULL) { in open_iface_live()
528 open_single_iface(const char *iface, pcap_t **pcap) in open_single_iface() argument
530 if (open_iface_live(iface, pcap) < 0) { in open_single_iface()
569 open_single_rx_pcap(const char *pcap_filename, pcap_t **pcap) in open_single_rx_pcap() argument
571 *pcap = pcap_open_offline(pcap_filename, errbuf); in open_single_rx_pcap()
572 if (*pcap == NULL) { in open_single_rx_pcap()
582 count_packets_in_pcap(pcap_t **pcap, struct pcap_rx_queue *pcap_q) in count_packets_in_pcap() argument
588 while ((packet = pcap_next(*pcap, &header))) in count_packets_in_pcap()
592 pcap_close(*pcap); in count_packets_in_pcap()
593 *pcap = NULL; in count_packets_in_pcap()
594 open_single_rx_pcap(pcap_q->name, pcap); in count_packets_in_pcap()
889 pcap_t **pcap; in eth_rx_queue_setup() local
892 pcap = &pp->rx_pcap[pcap_q->queue_id]; in eth_rx_queue_setup()
894 if (unlikely(*pcap == NULL)) in eth_rx_queue_setup()
897 pcap_pkt_count = count_packets_in_pcap(pcap, pcap_q); in eth_rx_queue_setup()
1011 pcap_t *pcap, pcap_dumper_t *dumper) in add_queue() argument
1015 if (pcap) in add_queue()
1016 pmd->queue[pmd->num_of_queue].pcap = pcap; in add_queue()
1034 pcap_t *pcap = NULL; in open_rx_pcap() local
1036 if (open_single_rx_pcap(pcap_filename, &pcap) < 0) in open_rx_pcap()
1039 if (add_queue(rx, pcap_filename, key, pcap, NULL) < 0) { in open_rx_pcap()
1040 pcap_close(pcap); in open_rx_pcap()
1077 pcap_t *pcap = NULL; in open_rx_tx_iface() local
1079 if (open_single_iface(iface, &pcap) < 0) in open_rx_tx_iface()
1082 tx->queue[0].pcap = pcap; in open_rx_tx_iface()
1090 set_iface_direction(const char *iface, pcap_t *pcap, in set_iface_direction() argument
1094 if (pcap_setdirection(pcap, direction) < 0) { in set_iface_direction()
1096 iface, direction_str, pcap_geterr(pcap)); in set_iface_direction()
1109 pcap_t *pcap = NULL; in open_iface() local
1111 if (open_single_iface(iface, &pcap) < 0) in open_iface()
1113 if (add_queue(pmd, iface, key, pcap, NULL) < 0) { in open_iface()
1114 pcap_close(pcap); in open_iface()
1135 pmd->queue[qid].pcap, in open_rx_iface()
1298 pp->rx_pcap[i] = queue->pcap; in eth_from_pcaps_common()
1308 pp->tx_pcap[i] = queue->pcap; in eth_from_pcaps_common()
1377 if (pcaps->queue[0].pcap) in eth_release_pcaps()
1378 pcap_close(pcaps->queue[0].pcap); in eth_release_pcaps()
1386 if (dumpers->queue[i].pcap) in eth_release_pcaps()
1387 pcap_close(dumpers->queue[i].pcap); in eth_release_pcaps()
1391 if (pcaps->queue[i].pcap) in eth_release_pcaps()
1392 pcap_close(pcaps->queue[i].pcap); in eth_release_pcaps()
1590 pp->rx_pcap[i] = pcaps.queue[i].pcap; in pmd_pcap_probe()
1594 pp->tx_pcap[i] = dumpers.queue[i].pcap; in pmd_pcap_probe()