* Configure the RX function to use. * * @param dev * Pointer to private data structure. * * @return * Pointer to selected Rx burst function. */
| 705 | * Pointer to selected Rx burst function. |
| 706 | */ |
| 707 | eth_rx_burst_t |
| 708 | mlx5_select_rx_function(struct rte_eth_dev *dev) |
| 709 | { |
| 710 | eth_rx_burst_t rx_pkt_burst = mlx5_rx_burst; |
| 711 | |
| 712 | MLX5_ASSERT(dev != NULL); |
| 713 | if (mlx5_shared_rq_enabled(dev)) { |
| 714 | rx_pkt_burst = mlx5_rx_burst_out_of_order; |
| 715 | DRV_LOG(DEBUG, "port %u forced to use SPRQ" |
| 716 | " Rx function with Out-of-Order completions", |
| 717 | dev->data->port_id); |
| 718 | } else if (mlx5_check_vec_rx_support(dev) > 0) { |
| 719 | if (mlx5_mprq_enabled(dev)) { |
| 720 | rx_pkt_burst = mlx5_rx_burst_mprq_vec; |
| 721 | DRV_LOG(DEBUG, "port %u selected vectorized" |
| 722 | " MPRQ Rx function", dev->data->port_id); |
| 723 | } else { |
| 724 | rx_pkt_burst = mlx5_rx_burst_vec; |
| 725 | DRV_LOG(DEBUG, "port %u selected vectorized" |
| 726 | " SPRQ Rx function", dev->data->port_id); |
| 727 | } |
| 728 | } else if (mlx5_mprq_enabled(dev)) { |
| 729 | rx_pkt_burst = mlx5_rx_burst_mprq; |
| 730 | DRV_LOG(DEBUG, "port %u selected MPRQ Rx function", |
| 731 | dev->data->port_id); |
| 732 | } else { |
| 733 | DRV_LOG(DEBUG, "port %u selected SPRQ Rx function", |
| 734 | dev->data->port_id); |
| 735 | } |
| 736 | return rx_pkt_burst; |
| 737 | } |
| 738 | |
| 739 | /** |
| 740 | * Get the E-Switch parameters by port id. |
no test coverage detected