common/mlx5: introduce common library
[dpdk.git] / drivers / net / mlx5 / mlx5_ethdev.c
index d80ae45..eddf888 100644 (file)
 #include <rte_rwlock.h>
 #include <rte_cycles.h>
 
+#include <mlx5_glue.h>
+#include <mlx5_devx_cmds.h>
+
 #include "mlx5.h"
-#include "mlx5_glue.h"
 #include "mlx5_rxtx.h"
 #include "mlx5_utils.h"
 
@@ -476,7 +478,7 @@ mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev)
 
                rxq_data = (*priv->rxqs)[i];
                rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq);
-               if (rxq_ctrl->type == MLX5_RXQ_TYPE_STANDARD)
+               if (rxq_ctrl && rxq_ctrl->type == MLX5_RXQ_TYPE_STANDARD)
                        rss_queue_arr[j++] = i;
        }
        rss_queue_n = j;