net/mlx5: move rdma-core calls to separate file
[dpdk.git] / drivers / net / mlx5 / mlx5_ethdev.c
index 83657f5..cbc735a 100644 (file)
@@ -64,6 +64,7 @@
 #include <rte_malloc.h>
 
 #include "mlx5.h"
+#include "mlx5_glue.h"
 #include "mlx5_rxtx.h"
 #include "mlx5_utils.h"
 
@@ -1261,7 +1262,7 @@ priv_dev_status_handler(struct priv *priv)
 
        /* Read all message and acknowledge them. */
        for (;;) {
-               if (ibv_get_async_event(priv->ctx, &event))
+               if (mlx5_glue->get_async_event(priv->ctx, &event))
                        break;
                if ((event.event_type == IBV_EVENT_PORT_ACTIVE ||
                        event.event_type == IBV_EVENT_PORT_ERR) &&
@@ -1273,7 +1274,7 @@ priv_dev_status_handler(struct priv *priv)
                else
                        DEBUG("event type %d on port %d not handled",
                              event.event_type, event.element.port_num);
-               ibv_ack_async_event(&event);
+               mlx5_glue->ack_async_event(&event);
        }
        if (ret & (1 << RTE_ETH_EVENT_INTR_LSC))
                if (priv_link_status_update(priv))
@@ -1559,7 +1560,7 @@ mlx5_is_removed(struct rte_eth_dev *dev)
        struct ibv_device_attr device_attr;
        struct priv *priv = dev->data->dev_private;
 
-       if (ibv_query_device(priv->ctx, &device_attr) == EIO)
+       if (mlx5_glue->query_device(priv->ctx, &device_attr) == EIO)
                return 1;
        return 0;
 }