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

Function mlx5_select_rx_function

dpdk/drivers/net/mlx5/mlx5_ethdev.c:707–737  ·  view source on GitHub ↗

* Configure the RX function to use. * * @param dev * Pointer to private data structure. * * @return * Pointer to selected Rx burst function. */

Source from the content-addressed store, hash-verified

705 * Pointer to selected Rx burst function.
706 */
707eth_rx_burst_t
708mlx5_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.

Callers 3

mlx5_trigger.cFile · 0.85
mlx5_dev_spawnFunction · 0.85

Calls 3

mlx5_shared_rq_enabledFunction · 0.85
mlx5_mprq_enabledFunction · 0.85

Tested by

no test coverage detected