MPRQ is silently turned off in case there is not enough
Rx queues configured. Improve the logging to show a
warning in this case to notify a user about the Rx burst
function selected.

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Cc: sta...@dpdk.org

Signed-off-by: Alexander Kozyrev <akozy...@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viachesl...@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 9bc7af6..7a50ec6 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1921,19 +1921,22 @@ struct mlx5_rxq_ctrl *
                tmpl->rxq.sges_n = sges_n;
                max_lro_size = max_rx_pkt_len;
        }
-       if (mprq_en && !mlx5_rxq_mprq_enabled(&tmpl->rxq))
+       if (config->mprq.enabled && !mlx5_rxq_mprq_enabled(&tmpl->rxq))
                DRV_LOG(WARNING,
-                       "port %u MPRQ is requested but cannot be enabled"
-                       " (requested: packet size = %u, desc = %u,"
-                       " stride_sz = %u, stride_num = %u,"
-                       " supported: min_stride_sz = %u, max_stride_sz = %u).",
-                       dev->data->port_id, non_scatter_min_mbuf_size, desc,
+                       "port %u MPRQ is requested but cannot be enabled\n"
+                       " (requested: pkt_sz = %u, desc_num = %u,"
+                       " rxq_num = %u, stride_sz = %u, stride_num = %u\n"
+                       "  supported: min_rxqs_num = %u,"
+                       " min_stride_sz = %u, max_stride_sz = %u).",
+                       dev->data->port_id, non_scatter_min_mbuf_size,
+                       desc, priv->rxqs_n,
                        config->mprq.stride_size_n ?
                                (1U << config->mprq.stride_size_n) :
                                (1U << mprq_stride_size),
                        config->mprq.stride_num_n ?
                                (1U << config->mprq.stride_num_n) :
                                (1U << mprq_stride_nums),
+                       config->mprq.min_rxqs_num,
                        (1U << config->mprq.min_stride_size_n),
                        (1U << config->mprq.max_stride_size_n));
        DRV_LOG(DEBUG, "port %u maximum number of segments per packet: %u",
-- 
1.8.3.1

Reply via email to