'mlx5dv_dr_action_create_flow_sampler'],
[ 'HAVE_MLX5DV_DR_MEM_RECLAIM', 'infiniband/mlx5dv.h',
'mlx5dv_dr_domain_set_reclaim_device_memory'],
+ [ 'HAVE_MLX5_DR_CREATE_ACTION_DEST_ARRAY', 'infiniband/mlx5dv.h',
+ 'mlx5dv_dr_action_create_dest_array'],
[ 'HAVE_DEVLINK', 'linux/devlink.h', 'DEVLINK_GENL_NAME' ],
]
config = configuration_data()
}
static void *
-mlx5_glue_dr_create_flow_action_sampler(
- struct mlx5dv_dr_flow_sampler_attr *attr)
+mlx5_glue_dr_create_flow_action_sampler
+ (struct mlx5dv_dr_flow_sampler_attr *attr)
{
#ifdef HAVE_MLX5_DR_CREATE_ACTION_FLOW_SAMPLE
return mlx5dv_dr_action_create_flow_sampler(attr);
#endif
}
+static void *
+mlx5_glue_dr_action_create_dest_array
+ (void *domain,
+ size_t num_dest,
+ struct mlx5dv_dr_action_dest_attr *dests[])
+{
+#ifdef HAVE_MLX5_DR_CREATE_ACTION_DEST_ARRAY
+ return mlx5dv_dr_action_create_dest_array
+ (domain,
+ num_dest,
+ dests);
+#else
+ (void)domain;
+ (void)num_dest;
+ (void)dests;
+ errno = ENOTSUP;
+ return NULL;
+#endif
+}
+
static int
mlx5_glue_devx_query_eqn(struct ibv_context *ctx, uint32_t cpus,
uint32_t *eqn)
.dr_reclaim_domain_memory = mlx5_glue_dr_reclaim_domain_memory,
.dr_create_flow_action_sampler =
mlx5_glue_dr_create_flow_action_sampler,
+ .dr_create_flow_action_dest_array =
+ mlx5_glue_dr_action_create_dest_array,
.devx_query_eqn = mlx5_glue_devx_query_eqn,
.devx_create_event_channel = mlx5_glue_devx_create_event_channel,
.devx_destroy_event_channel = mlx5_glue_devx_destroy_event_channel,
};
#endif
+#ifndef HAVE_MLX5_DR_CREATE_ACTION_DEST_ARRAY
+enum mlx5dv_dr_action_dest_type {
+ MLX5DV_DR_ACTION_DEST,
+ MLX5DV_DR_ACTION_DEST_REFORMAT,
+};
+struct mlx5dv_dr_action_dest_reformat {
+ struct mlx5dv_dr_action *reformat;
+ struct mlx5dv_dr_action *dest;
+};
+struct mlx5dv_dr_action_dest_attr {
+ enum mlx5dv_dr_action_dest_type type;
+ union {
+ struct mlx5dv_dr_action *dest;
+ struct mlx5dv_dr_action_dest_reformat *dest_reformat;
+ };
+};
+#endif
+
#ifndef HAVE_IBV_DEVX_EVENT
struct mlx5dv_devx_event_channel { int fd; };
struct mlx5dv_devx_async_event_hdr;
void (*dv_free_pp)(struct mlx5dv_pp *pp);
void *(*dr_create_flow_action_sampler)
(struct mlx5dv_dr_flow_sampler_attr *attr);
+ void *(*dr_create_flow_action_dest_array)
+ (void *domain,
+ size_t num_dest,
+ struct mlx5dv_dr_action_dest_attr *dests[]);
};
extern const struct mlx5_glue *mlx5_glue;