src/dpdk/drivers/net/bnxt/bnxt_ethdev.c
static int bnxt_scattered_rx(struct rte_eth_dev *eth_dev)
{
	uint16_t buf_size;
	int i;

	if (eth_dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_SCATTER)
		return 1;

	if (eth_dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_TCP_LRO)
		return 1;

	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
		struct bnxt_rx_queue *rxq = eth_dev->data->rx_queues[i];

		buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rxq->mb_pool) -
				      RTE_PKTMBUF_HEADROOM);
		if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len > buf_size)
			return 1;
	}
	return 0;
}
/*
 * Determine whether the current configuration requires support for scattered
 * receive; return 1 if scattered receive is required and 0 if not.
 */
Determine whether the current configuration requires support for scattered
receive; return 1 if scattered receive is required and 0 if not.
Determine whether the current configuration requires support for scattered receive ; return 1 if scattered receive is required and 0 if not .
static int bnxt_scattered_rx(struct rte_eth_dev *eth_dev)
{
	uint16_t buf_size;
	int i;
	if (eth_dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_SCATTER)
		return 1;
	if (eth_dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_TCP_LRO)
		return 1;
	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
		struct bnxt_rx_queue *rxq = eth_dev->data->rx_queues[i];
		buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rxq->mb_pool) -
				      RTE_PKTMBUF_HEADROOM);
		if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len > buf_size)
			return 1;
	}
	return 0;
}
static int bnxt_scattered_rx ( struct rte_eth_dev * eth_dev ) { uint16_t buf_size ; int i ; if ( eth_dev -> data -> dev_conf . rxmode . offloads & DEV_RX_OFFLOAD_SCATTER ) return 1 ; if ( eth_dev -> data -> dev_conf . rxmode . offloads & DEV_RX_OFFLOAD_TCP_LRO ) return 1 ; for ( i = 0 ; i < eth_dev -> data -> nb_rx_queues ; i ++ ) { struct bnxt_rx_queue * rxq = eth_dev -> data -> rx_queues [ i ] ; buf_size = ( uint16_t ) ( rte_pktmbuf_data_room_size ( rxq -> mb_pool ) - RTE_PKTMBUF_HEADROOM ) ; if ( eth_dev -> data -> dev_conf . rxmode . max_rx_pkt_len > buf_size ) return 1 ; } return 0 ; }
Determine whether the current configuration requires support for scattered
 receive; return 1 if scattered receive is required and 0 if not.
Determine whether the current configuration requires support for scattered receive ; return 1 if scattered receive is required and 0 if not .