src/dpdk/drivers/net/txgbe/txgbe_rxtx.c
uint16_t
txgbe_recv_pkts_bulk_alloc(void *rx_queue, struct rte_mbuf **rx_pkts,
			   uint16_t nb_pkts)
{
	uint16_t nb_rx;

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

	if (likely(nb_pkts <= RTE_PMD_TXGBE_RX_MAX_BURST))
		return txgbe_rx_recv_pkts(rx_queue, rx_pkts, nb_pkts);

	/* request is relatively large, chunk it up */
	nb_rx = 0;
	while (nb_pkts) {
		uint16_t ret, n;

		n = (uint16_t)RTE_MIN(nb_pkts, RTE_PMD_TXGBE_RX_MAX_BURST);
		ret = txgbe_rx_recv_pkts(rx_queue, &rx_pkts[nb_rx], n);
		nb_rx = (uint16_t)(nb_rx + ret);
		nb_pkts = (uint16_t)(nb_pkts - ret);
		if (ret < n)
			break;
	}

	return nb_rx;
}
/* split requests into chunks of size RTE_PMD_TXGBE_RX_MAX_BURST */
split requests into chunks of size RTE_PMD_TXGBE_RX_MAX_BURST
split requests into chunks of size RTE_PMD_TXGBE_RX_MAX_BURST
uint16_t
txgbe_recv_pkts_bulk_alloc(void *rx_queue, struct rte_mbuf **rx_pkts,
			   uint16_t nb_pkts)
{
	uint16_t nb_rx;
	if (unlikely(nb_pkts == 0))
		return 0;
	if (likely(nb_pkts <= RTE_PMD_TXGBE_RX_MAX_BURST))
		return txgbe_rx_recv_pkts(rx_queue, rx_pkts, nb_pkts);
	nb_rx = 0;
	while (nb_pkts) {
		uint16_t ret, n;
		n = (uint16_t)RTE_MIN(nb_pkts, RTE_PMD_TXGBE_RX_MAX_BURST);
		ret = txgbe_rx_recv_pkts(rx_queue, &rx_pkts[nb_rx], n);
		nb_rx = (uint16_t)(nb_rx + ret);
		nb_pkts = (uint16_t)(nb_pkts - ret);
		if (ret < n)
			break;
	}
	return nb_rx;
}
uint16_t txgbe_recv_pkts_bulk_alloc ( void * rx_queue , struct rte_mbuf * * rx_pkts , uint16_t nb_pkts ) { uint16_t nb_rx ; if ( unlikely ( nb_pkts == 0 ) ) return 0 ; if ( likely ( nb_pkts <= RTE_PMD_TXGBE_RX_MAX_BURST ) ) return txgbe_rx_recv_pkts ( rx_queue , rx_pkts , nb_pkts ) ; nb_rx = 0 ; while ( nb_pkts ) { uint16_t ret , n ; n = ( uint16_t ) RTE_MIN ( nb_pkts , RTE_PMD_TXGBE_RX_MAX_BURST ) ; ret = txgbe_rx_recv_pkts ( rx_queue , & rx_pkts [ nb_rx ] , n ) ; nb_rx = ( uint16_t ) ( nb_rx + ret ) ; nb_pkts = ( uint16_t ) ( nb_pkts - ret ) ; if ( ret < n ) break ; } return nb_rx ; }
split requests into chunks of size RTE_PMD_TXGBE_RX_MAX_BURST
split requests into chunks of size RTE_PMD_TXGBE_RX_MAX_BURST
/* request is relatively large, chunk it up */