net/bnxt: add Truflow flush-timer to alloc table scope
[dpdk.git] / drivers / common / mlx5 / mlx5_glue.c
index 5691636..f270f67 100644 (file)
@@ -14,8 +14,6 @@
  */
 #include <sys/types.h>
 
-#include <rte_config.h>
-
 #include "mlx5_glue.h"
 
 static int
@@ -1008,7 +1006,7 @@ mlx5_glue_devx_qp_query(struct ibv_qp *qp,
                        const void *in, size_t inlen,
                        void *out, size_t outlen)
 {
-#ifdef HAVE_IBV_DEVX_OBJ
+#ifdef HAVE_IBV_DEVX_QP
        return mlx5dv_devx_qp_query(qp, in, inlen, out, outlen);
 #else
        (void)qp;
@@ -1160,8 +1158,32 @@ mlx5_glue_devx_free_uar(struct mlx5dv_devx_uar *devx_uar)
 #endif
 }
 
-alignas(RTE_CACHE_LINE_SIZE)
-const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){
+static struct mlx5dv_var *
+mlx5_glue_dv_alloc_var(struct ibv_context *context, uint32_t flags)
+{
+#ifdef HAVE_IBV_VAR
+       return mlx5dv_alloc_var(context, flags);
+#else
+       (void)context;
+       (void)flags;
+       errno = ENOTSUP;
+       return NULL;
+#endif
+}
+
+static void
+mlx5_glue_dv_free_var(struct mlx5dv_var *var)
+{
+#ifdef HAVE_IBV_VAR
+       mlx5dv_free_var(var);
+#else
+       (void)var;
+       errno = ENOTSUP;
+#endif
+}
+
+__rte_cache_aligned
+const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) {
        .version = MLX5_GLUE_VERSION,
        .fork_init = mlx5_glue_fork_init,
        .alloc_pd = mlx5_glue_alloc_pd,
@@ -1267,4 +1289,6 @@ const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){
        .devx_get_event = mlx5_glue_devx_get_event,
        .devx_alloc_uar = mlx5_glue_devx_alloc_uar,
        .devx_free_uar = mlx5_glue_devx_free_uar,
+       .dv_alloc_var = mlx5_glue_dv_alloc_var,
+       .dv_free_var = mlx5_glue_dv_free_var,
 };