X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fcommon%2Fmlx5%2Flinux%2Fmlx5_glue.h;h=f39ef2dac78eb14467b1189b4f4d850f9b3a0282;hb=fc59a1ec556b4464296b1fccec596ea08879e237;hp=a77d2393bbe085ff00327e28acea3b15e5ba7b64;hpb=a3def8547929b00fbead85c08862ebe60faf70f5;p=dpdk.git diff --git a/drivers/common/mlx5/linux/mlx5_glue.h b/drivers/common/mlx5/linux/mlx5_glue.h index a77d2393bb..f39ef2dac7 100644 --- a/drivers/common/mlx5/linux/mlx5_glue.h +++ b/drivers/common/mlx5/linux/mlx5_glue.h @@ -78,12 +78,27 @@ struct mlx5dv_devx_async_cmd_hdr; enum mlx5dv_dr_domain_type { unused, }; struct mlx5dv_dr_domain; struct mlx5dv_dr_action; +#define MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL 1 #endif #ifndef HAVE_MLX5DV_DR_DEVX_PORT struct mlx5dv_devx_port; #endif +#ifndef HAVE_MLX5DV_DR_DEVX_PORT_V35 +struct mlx5dv_port; +#endif + +#define MLX5_PORT_QUERY_VPORT (1u << 0) +#define MLX5_PORT_QUERY_REG_C0 (1u << 1) + +struct mlx5_port_info { + uint16_t query_flags; + uint16_t vport_id; /* Associated VF vport index (if any). */ + uint32_t vport_meta_tag; /* Used for vport index match ove VF LAG. */ + uint32_t vport_meta_mask; /* Used for vport index field match mask. */ +}; + #ifndef HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER struct mlx5dv_dr_flow_meter_attr; #endif @@ -98,6 +113,24 @@ struct mlx5dv_dr_flow_sampler_attr { }; #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; @@ -113,7 +146,6 @@ struct mlx5dv_var { uint32_t page_id; uint32_t length; off_t mmap_off; #define IBV_ACCESS_RELAXED_ORDERING 0 #endif -/* LIB_GLUE_VERSION must be updated every time this structure is modified. */ struct mlx5_glue { const char *version; int (*fork_init)(void); @@ -206,6 +238,7 @@ struct mlx5_glue { 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, @@ -289,10 +322,13 @@ struct mlx5_glue { int (*devx_qp_query)(struct ibv_qp *qp, const void *in, size_t inlen, void *out, size_t outlen); + int (*devx_wq_query)(struct ibv_wq *wq, const void *in, size_t inlen, + void *out, size_t outlen); int (*devx_port_query)(struct ibv_context *ctx, uint32_t port_num, - struct mlx5dv_devx_port *mlx5_devx_port); + struct mlx5_port_info *info); int (*dr_dump_domain)(FILE *file, void *domain); + int (*dr_dump_rule)(FILE *file, void *rule); int (*devx_query_eqn)(struct ibv_context *context, uint32_t cpus, uint32_t *eqn); struct mlx5dv_devx_event_channel *(*devx_create_event_channel) @@ -315,6 +351,7 @@ struct mlx5_glue { struct mlx5dv_devx_async_event_hdr *event_data, size_t event_resp_len); void (*dr_reclaim_domain_memory)(void *domain, uint32_t enable); + void (*dr_allow_duplicate_rules)(void *domain, uint32_t allow); struct mlx5dv_pp *(*dv_alloc_pp)(struct ibv_context *context, size_t pp_context_sz, const void *pp_context, @@ -322,6 +359,13 @@ struct mlx5_glue { 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[]); + void *(*dv_create_flow_action_aso) + (struct mlx5dv_dr_domain *domain, void *aso_obj, + uint32_t offset, uint32_t flags, uint8_t return_reg_c); }; extern const struct mlx5_glue *mlx5_glue;