MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_scattered_rx

Function bnxt_scattered_rx

dpdk/drivers/net/bnxt/bnxt_ethdev.c:1217–1238  ·  view source on GitHub ↗

* Determine whether the current configuration requires support for scattered * receive; return 1 if scattered receive is required and 0 if not. */

Source from the content-addressed store, hash-verified

1215 * receive; return 1 if scattered receive is required and 0 if not.
1216 */
1217static int bnxt_scattered_rx(struct rte_eth_dev *eth_dev)
1218{
1219 uint32_t overhead = BNXT_MAX_PKT_LEN - BNXT_MAX_MTU;
1220 uint16_t buf_size;
1221 int i;
1222
1223 if (eth_dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_SCATTER)
1224 return 1;
1225
1226 if (eth_dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO)
1227 return 1;
1228
1229 for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
1230 struct bnxt_rx_queue *rxq = eth_dev->data->rx_queues[i];
1231
1232 buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rxq->mb_pool) -
1233 RTE_PKTMBUF_HEADROOM);
1234 if (eth_dev->data->mtu + overhead > buf_size)
1235 return 1;
1236 }
1237 return 0;
1238}
1239
1240static eth_rx_burst_t
1241bnxt_receive_function(struct rte_eth_dev *eth_dev)

Callers 1

bnxt_dev_start_opFunction · 0.85

Calls 1

Tested by

no test coverage detected