New upstream version 17.11.4
[deb_dpdk.git] / drivers / net / mlx4 / mlx4_rxq.c
index 06030c2..b3f70d6 100644 (file)
@@ -365,6 +365,12 @@ mlx4_rss_init(struct priv *priv)
 
        if (priv->rss_init)
                return 0;
+       if (priv->dev->data->nb_rx_queues > priv->hw_rss_max_qps) {
+               ERROR("RSS does not support more than %d queues",
+                     priv->hw_rss_max_qps);
+               rte_errno = EINVAL;
+               return -rte_errno;
+       }
        /* Prepare range for RSS contexts before creating the first WQ. */
        ret = mlx4dv_set_context_attr(priv->ctx,
                                      MLX4DV_SET_CTX_ATTR_LOG_WQS_RANGE_SZ,