*/
#include <sys/types.h>
-#include <rte_config.h>
-
#include "mlx5_glue.h"
static int
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;
#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,
.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,
};