net/mlx5: add glue for create action via DevX
[dpdk.git] / drivers / net / mlx5 / mlx5_glue.h
index 433c9ed..f8e2b9a 100644 (file)
@@ -61,6 +61,12 @@ enum mlx5dv_flow_table_type { flow_table_type = 0, };
 
 #ifndef HAVE_IBV_DEVX_OBJ
 struct mlx5dv_devx_obj;
+struct mlx5dv_devx_umem;
+#endif
+
+#ifndef HAVE_IBV_DEVX_ASYNC
+struct mlx5dv_devx_cmd_comp;
+struct mlx5dv_devx_async_cmd_hdr;
 #endif
 
 #ifndef HAVE_MLX5DV_DR
@@ -181,6 +187,7 @@ struct mlx5_glue {
                          size_t num_actions, void *actions[]);
        void *(*dv_create_flow_action_counter)(void *obj, uint32_t  offset);
        void *(*dv_create_flow_action_dest_ibv_qp)(void *qp);
+       void *(*dv_create_flow_action_dest_devx_tir)(void *tir);
        void *(*dv_create_flow_action_modify_header)
                (struct ibv_context *ctx, enum mlx5dv_flow_table_type ft_type,
                 void *domain, uint64_t flags, size_t actions_sz,
@@ -209,6 +216,23 @@ struct mlx5_glue {
        int (*devx_general_cmd)(struct ibv_context *context,
                                const void *in, size_t inlen,
                                void *out, size_t outlen);
+       struct mlx5dv_devx_cmd_comp *(*devx_create_cmd_comp)
+                                       (struct ibv_context *context);
+       void (*devx_destroy_cmd_comp)(struct mlx5dv_devx_cmd_comp *cmd_comp);
+       int (*devx_obj_query_async)(struct mlx5dv_devx_obj *obj,
+                                   const void *in, size_t inlen,
+                                   size_t outlen, uint64_t wr_id,
+                                   struct mlx5dv_devx_cmd_comp *cmd_comp);
+       int (*devx_get_async_cmd_comp)(struct mlx5dv_devx_cmd_comp *cmd_comp,
+                                      struct mlx5dv_devx_async_cmd_hdr *resp,
+                                      size_t cmd_resp_len);
+       struct mlx5dv_devx_umem *(*devx_umem_reg)(struct ibv_context *context,
+                                                 void *addr, size_t size,
+                                                 uint32_t access);
+       int (*devx_umem_dereg)(struct mlx5dv_devx_umem *dv_devx_umem);
+       int (*devx_qp_query)(struct ibv_qp *qp,
+                            const void *in, size_t inlen,
+                            void *out, size_t outlen);
 };
 
 const struct mlx5_glue *mlx5_glue;