src/dpdk/drivers/net/pcap/rte_eth_pcap.c
static uint16_t
eth_tx_drop(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
{
	unsigned int i;
	uint32_t tx_bytes = 0;
	struct pcap_tx_queue *tx_queue = queue;

	if (unlikely(nb_pkts == 0))
		return 0;

	for (i = 0; i < nb_pkts; i++) {
		tx_bytes += bufs[i]->pkt_len;
		rte_pktmbuf_free(bufs[i]);
	}

	tx_queue->tx_stat.pkts += nb_pkts;
	tx_queue->tx_stat.bytes += tx_bytes;

	return i;
}
/*
 * Callback to handle dropping packets in the infinite rx case.
 */
Callback to handle dropping packets in the infinite rx case.
Callback to handle dropping packets in the infinite rx case .
static uint16_t
eth_tx_drop(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
{
	unsigned int i;
	uint32_t tx_bytes = 0;
	struct pcap_tx_queue *tx_queue = queue;
	if (unlikely(nb_pkts == 0))
		return 0;
	for (i = 0; i < nb_pkts; i++) {
		tx_bytes += bufs[i]->pkt_len;
		rte_pktmbuf_free(bufs[i]);
	}
	tx_queue->tx_stat.pkts += nb_pkts;
	tx_queue->tx_stat.bytes += tx_bytes;
	return i;
}
static uint16_t eth_tx_drop ( void * queue , struct rte_mbuf * * bufs , uint16_t nb_pkts ) { unsigned int i ; uint32_t tx_bytes = 0 ; struct pcap_tx_queue * tx_queue = queue ; if ( unlikely ( nb_pkts == 0 ) ) return 0 ; for ( i = 0 ; i < nb_pkts ; i ++ ) { tx_bytes += bufs [ i ] -> pkt_len ; rte_pktmbuf_free ( bufs [ i ] ) ; } tx_queue -> tx_stat . pkts += nb_pkts ; tx_queue -> tx_stat . bytes += tx_bytes ; return i ; }
Callback to handle dropping packets in the infinite rx case.
Callback to handle dropping packets in the infinite rx case .