net/mlx5: add C++ include guard to public header
[dpdk.git] / drivers / net / mlx5 / mlx5_ethdev.c
index cde5059..dc647d5 100644 (file)
@@ -26,6 +26,7 @@
 #include "mlx5_rx.h"
 #include "mlx5_tx.h"
 #include "mlx5_autoconf.h"
+#include "mlx5_devx.h"
 
 /**
  * Get the interface index from device name.
@@ -114,7 +115,6 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
                rte_errno = ENOMEM;
                return -rte_errno;
        }
-       priv->rxqs = (void *)dev->data->rx_queues;
        priv->txqs = (void *)dev->data->tx_queues;
        if (txqs_n != priv->txqs_n) {
                DRV_LOG(INFO, "port %u Tx queues number update: %u -> %u",
@@ -171,11 +171,8 @@ mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev)
                return -rte_errno;
        }
        for (i = 0, j = 0; i < rxqs_n; i++) {
-               struct mlx5_rxq_data *rxq_data;
-               struct mlx5_rxq_ctrl *rxq_ctrl;
+               struct mlx5_rxq_ctrl *rxq_ctrl = mlx5_rxq_ctrl_get(dev, i);
 
-               rxq_data = (*priv->rxqs)[i];
-               rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq);
                if (rxq_ctrl && rxq_ctrl->type == MLX5_RXQ_TYPE_STANDARD)
                        rss_queue_arr[j++] = i;
        }
@@ -340,9 +337,13 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
        info->flow_type_rss_offloads = ~MLX5_RSS_HF_MASK;
        mlx5_set_default_params(dev, info);
        mlx5_set_txlimit_params(dev, info);
+       if (priv->config.hca_attr.mem_rq_rmp &&
+           priv->obj_ops.rxq_obj_new == devx_obj_ops.rxq_obj_new)
+               info->dev_capa |= RTE_ETH_DEV_CAPA_RXQ_SHARE;
        info->switch_info.name = dev->data->name;
        info->switch_info.domain_id = priv->domain_id;
        info->switch_info.port_id = priv->representor_id;
+       info->switch_info.rx_domain = 0; /* No sub Rx domains. */
        if (priv->representor) {
                uint16_t port_id;