dpdk通过mlx5发包的问题

使用dpdk通过mlx5发送数据包,报如下错误:

    net_mlx5: port 1 cannot allocate RSS queue list (0)
    net_mlx5: port 1 reta config failed: Cannot allocate memory

解决方法是修改drivers/net/mlx5/mlx5_ethdev.c

if (priv->skip_default_rss_reta)

改为

if (priv->skip_default_rss_reta || !rxqs_n)

文件对比如下:

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index d7d3bc7..1d443c1 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -463,7 +463,7 @@ struct ethtool_link_settings {
        unsigned int *rss_queue_arr = NULL;
        unsigned int rss_queue_n = 0;
 
-       if (priv->skip_default_rss_reta)
+       if (priv->skip_default_rss_reta || !rxqs_n)
                return ret;
        rss_queue_arr = rte_malloc("", rxqs_n * sizeof(unsigned int), 0);
        if (!rss_queue_arr) {
-- 
1.8.3.1

 

你可能感兴趣的:(dpdk,dpdk)