#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
-#include <rte_memory.h>
/*
* Not needed by this file; included to work around the lack of off_t
* definition for mlx5dv.h with unpatched rdma-core versions.
#include <sys/types.h>
#include "mlx5_glue.h"
-#include "../mlx5_malloc.h"
static int
mlx5_glue_fork_init(void)
res = ibv_destroy_flow_action(attr->action);
break;
}
- mlx5_free(action);
+ free(action);
return res;
#endif
#else
struct mlx5dv_flow_action_attr *action;
(void)offset;
- action = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);
+ action = malloc(sizeof(*action));
if (!action)
return NULL;
action->type = MLX5DV_FLOW_ACTION_COUNTERS_DEVX;
#else
struct mlx5dv_flow_action_attr *action;
- action = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);
+ action = malloc(sizeof(*action));
if (!action)
return NULL;
action->type = MLX5DV_FLOW_ACTION_DEST_IBV_QP;
(void)domain;
(void)flags;
- action = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);
+ action = malloc(sizeof(*action));
if (!action)
return NULL;
action->type = MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION;
(void)flags;
struct mlx5dv_flow_action_attr *action;
- action = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);
+ action = malloc(sizeof(*action));
if (!action)
return NULL;
action->type = MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION;
#else /* HAVE_MLX5DV_DR */
struct mlx5dv_flow_action_attr *action;
- action = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);
+ action = malloc(sizeof(*action));
if (!action)
return NULL;
action->type = MLX5DV_FLOW_ACTION_TAG;
#endif
}
+static void *
+mlx5_glue_dv_create_flow_action_aso(struct mlx5dv_dr_domain *domain,
+ void *aso_obj,
+ uint32_t offset,
+ uint32_t flags,
+ uint8_t return_reg_c)
+{
+#if defined(HAVE_MLX5DV_DR) && defined(HAVE_MLX5_DR_CREATE_ACTION_ASO)
+ return mlx5dv_dr_action_create_aso(domain, aso_obj, offset,
+ flags, return_reg_c);
+#else
+ (void)domain;
+ (void)aso_obj;
+ (void)offset;
+ (void)flags;
+ (void)return_reg_c;
+ errno = ENOTSUP;
+ return NULL;
+#endif
+}
+
static void *
mlx5_glue_dr_create_flow_action_default_miss(void)
{
.dv_create_flow_action_tag = mlx5_glue_dv_create_flow_action_tag,
.dv_create_flow_action_meter = mlx5_glue_dv_create_flow_action_meter,
.dv_modify_flow_action_meter = mlx5_glue_dv_modify_flow_action_meter,
+ .dv_create_flow_action_aso = mlx5_glue_dv_create_flow_action_aso,
.dr_create_flow_action_default_miss =
mlx5_glue_dr_create_flow_action_default_miss,
.dv_destroy_flow = mlx5_glue_dv_destroy_flow,