#endif
}
+static int
+mlx5_glue_dr_sync_domain(void *domain, uint32_t flags)
+{
+#ifdef HAVE_MLX5DV_DR
+ return mlx5dv_dr_domain_sync(domain, flags);
+#else
+ (void)domain;
+ (void)flags;
+ errno = ENOTSUP;
+ return errno;
+#endif
+}
+
static struct ibv_cq_ex *
mlx5_glue_dv_create_cq(struct ibv_context *context,
struct ibv_cq_init_attr_ex *cq_attr,
.dr_destroy_flow_tbl = mlx5_glue_dr_destroy_flow_tbl,
.dr_create_domain = mlx5_glue_dr_create_domain,
.dr_destroy_domain = mlx5_glue_dr_destroy_domain,
+ .dr_sync_domain = mlx5_glue_dr_sync_domain,
.dv_create_cq = mlx5_glue_dv_create_cq,
.dv_create_wq = mlx5_glue_dv_create_wq,
.dv_query_device = mlx5_glue_dv_query_device,
void *(*dr_create_domain)(struct ibv_context *ctx,
enum mlx5dv_dr_domain_type domain);
int (*dr_destroy_domain)(void *domain);
+ int (*dr_sync_domain)(void *domain, uint32_t flags);
struct ibv_cq_ex *(*dv_create_cq)
(struct ibv_context *context,
struct ibv_cq_init_attr_ex *cq_attr,
mlx5_mem_update_msl(addr);
#ifdef RTE_LIBRTE_MLX5_DEBUG
if (addr)
- __atomic_add_fetch(&mlx5_sys_mem->malloc_rte, 1,
+ __atomic_add_fetch(&mlx5_sys_mem.malloc_rte, 1,
__ATOMIC_RELAXED);
#endif
return addr;
addr = malloc(size);
#ifdef RTE_LIBRTE_MLX5_DEBUG
if (addr)
- __atomic_add_fetch(&mlx5_sys_mem->malloc_sys, 1,
+ __atomic_add_fetch(&mlx5_sys_mem.malloc_sys, 1,
__ATOMIC_RELAXED);
#endif
return addr;
mlx5_mem_update_msl(new_addr);
#ifdef RTE_LIBRTE_MLX5_DEBUG
if (new_addr)
- __atomic_add_fetch(&mlx5_sys_mem->realloc_rte, 1,
+ __atomic_add_fetch(&mlx5_sys_mem.realloc_rte, 1,
__ATOMIC_RELAXED);
#endif
return new_addr;
new_addr = realloc(addr, size);
#ifdef RTE_LIBRTE_MLX5_DEBUG
if (new_addr)
- __atomic_add_fetch(&mlx5_sys_mem->realloc_sys, 1,
+ __atomic_add_fetch(&mlx5_sys_mem.realloc_sys, 1,
__ATOMIC_RELAXED);
#endif
return new_addr;
return;
if (!mlx5_mem_is_rte(addr)) {
#ifdef RTE_LIBRTE_MLX5_DEBUG
- __atomic_add_fetch(&mlx5_sys_mem->free_sys, 1,
+ __atomic_add_fetch(&mlx5_sys_mem.free_sys, 1,
__ATOMIC_RELAXED);
#endif
free(addr);
} else {
#ifdef RTE_LIBRTE_MLX5_DEBUG
- __atomic_add_fetch(&mlx5_sys_mem->free_rte, 1,
+ __atomic_add_fetch(&mlx5_sys_mem.free_rte, 1,
__ATOMIC_RELAXED);
#endif
rte_free(addr);