* Determine whether the current configuration requires support for scattered * receive; return 1 if scattered receive is required and 0 if not. */
| 1215 | * receive; return 1 if scattered receive is required and 0 if not. |
| 1216 | */ |
| 1217 | static 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 | |
| 1240 | static eth_rx_burst_t |
| 1241 | bnxt_receive_function(struct rte_eth_dev *eth_dev) |
no test coverage detected