#include "mlx5hws_internal.h"
static enum mlx5_ifc_flow_destination_type
hws_cmd_dest_type_to_ifc_dest_type(enum mlx5_flow_destination_type type)
{
switch (type) {
case MLX5_FLOW_DESTINATION_TYPE_VPORT:
return MLX5_IFC_FLOW_DESTINATION_TYPE_VPORT;
case MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE:
return MLX5_IFC_FLOW_DESTINATION_TYPE_FLOW_TABLE;
case MLX5_FLOW_DESTINATION_TYPE_TIR:
return MLX5_IFC_FLOW_DESTINATION_TYPE_TIR;
case MLX5_FLOW_DESTINATION_TYPE_FLOW_SAMPLER:
return MLX5_IFC_FLOW_DESTINATION_TYPE_FLOW_SAMPLER;
case MLX5_FLOW_DESTINATION_TYPE_UPLINK:
return MLX5_IFC_FLOW_DESTINATION_TYPE_UPLINK;
case MLX5_FLOW_DESTINATION_TYPE_TABLE_TYPE:
return MLX5_IFC_FLOW_DESTINATION_TYPE_TABLE_TYPE;
case MLX5_FLOW_DESTINATION_TYPE_NONE:
case MLX5_FLOW_DESTINATION_TYPE_PORT:
case MLX5_FLOW_DESTINATION_TYPE_COUNTER:
case MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE_NUM:
case MLX5_FLOW_DESTINATION_TYPE_RANGE:
default:
pr_warn("HWS: unknown flow dest type %d\n", type);
return 0;
}
};
static int hws_cmd_general_obj_destroy(struct mlx5_core_dev *mdev,
u32 object_type,
u32 object_id)
{ … }
int mlx5hws_cmd_flow_table_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_ft_create_attr *ft_attr,
u32 *table_id)
{ … }
int mlx5hws_cmd_flow_table_modify(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_ft_modify_attr *ft_attr,
u32 table_id)
{ … }
int mlx5hws_cmd_flow_table_query(struct mlx5_core_dev *mdev,
u32 table_id,
struct mlx5hws_cmd_ft_query_attr *ft_attr,
u64 *icm_addr_0, u64 *icm_addr_1)
{ … }
int mlx5hws_cmd_flow_table_destroy(struct mlx5_core_dev *mdev,
u8 fw_ft_type, u32 table_id)
{ … }
void mlx5hws_cmd_alias_flow_table_destroy(struct mlx5_core_dev *mdev,
u32 table_id)
{ … }
static int hws_cmd_flow_group_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_fg_attr *fg_attr,
u32 *group_id)
{ … }
static int hws_cmd_flow_group_destroy(struct mlx5_core_dev *mdev,
u32 ft_id, u32 fg_id, u8 ft_type)
{ … }
int mlx5hws_cmd_set_fte(struct mlx5_core_dev *mdev,
u32 table_type,
u32 table_id,
u32 group_id,
struct mlx5hws_cmd_set_fte_attr *fte_attr)
{ … }
int mlx5hws_cmd_delete_fte(struct mlx5_core_dev *mdev,
u32 table_type,
u32 table_id)
{ … }
struct mlx5hws_cmd_forward_tbl *
mlx5hws_cmd_forward_tbl_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_ft_create_attr *ft_attr,
struct mlx5hws_cmd_set_fte_attr *fte_attr)
{ … }
void mlx5hws_cmd_forward_tbl_destroy(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_forward_tbl *tbl)
{ … }
void mlx5hws_cmd_set_attr_connect_miss_tbl(struct mlx5hws_context *ctx,
u32 fw_ft_type,
enum mlx5hws_table_type type,
struct mlx5hws_cmd_ft_modify_attr *ft_attr)
{ … }
int mlx5hws_cmd_rtc_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_rtc_create_attr *rtc_attr,
u32 *rtc_id)
{ … }
void mlx5hws_cmd_rtc_destroy(struct mlx5_core_dev *mdev, u32 rtc_id)
{ … }
int mlx5hws_cmd_stc_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_stc_create_attr *stc_attr,
u32 *stc_id)
{ … }
void mlx5hws_cmd_stc_destroy(struct mlx5_core_dev *mdev, u32 stc_id)
{ … }
static int
hws_cmd_stc_modify_set_stc_param(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_stc_modify_attr *stc_attr,
void *stc_param)
{ … }
int mlx5hws_cmd_stc_modify(struct mlx5_core_dev *mdev,
u32 stc_id,
struct mlx5hws_cmd_stc_modify_attr *stc_attr)
{ … }
int mlx5hws_cmd_arg_create(struct mlx5_core_dev *mdev,
u16 log_obj_range,
u32 pd,
u32 *arg_id)
{ … }
void mlx5hws_cmd_arg_destroy(struct mlx5_core_dev *mdev,
u32 arg_id)
{ … }
int mlx5hws_cmd_header_modify_pattern_create(struct mlx5_core_dev *mdev,
u32 pattern_length,
u8 *actions,
u32 *ptrn_id)
{ … }
void mlx5hws_cmd_header_modify_pattern_destroy(struct mlx5_core_dev *mdev,
u32 ptrn_id)
{ … }
int mlx5hws_cmd_ste_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_ste_create_attr *ste_attr,
u32 *ste_id)
{ … }
void mlx5hws_cmd_ste_destroy(struct mlx5_core_dev *mdev, u32 ste_id)
{ … }
int mlx5hws_cmd_definer_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_definer_create_attr *def_attr,
u32 *definer_id)
{ … }
void mlx5hws_cmd_definer_destroy(struct mlx5_core_dev *mdev,
u32 definer_id)
{ … }
int mlx5hws_cmd_packet_reformat_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_packet_reformat_create_attr *attr,
u32 *reformat_id)
{ … }
int mlx5hws_cmd_packet_reformat_destroy(struct mlx5_core_dev *mdev,
u32 reformat_id)
{ … }
int mlx5hws_cmd_sq_modify_rdy(struct mlx5_core_dev *mdev, u32 sqn)
{ … }
int mlx5hws_cmd_allow_other_vhca_access(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_allow_other_vhca_access_attr *attr)
{ … }
int mlx5hws_cmd_alias_obj_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_alias_obj_create_attr *alias_attr,
u32 *obj_id)
{ … }
int mlx5hws_cmd_alias_obj_destroy(struct mlx5_core_dev *mdev,
u16 obj_type,
u32 obj_id)
{ … }
int mlx5hws_cmd_generate_wqe(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_generate_wqe_attr *attr,
struct mlx5_cqe64 *ret_cqe)
{ … }
int mlx5hws_cmd_query_caps(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_query_caps *caps)
{ … }
int mlx5hws_cmd_query_gvmi(struct mlx5_core_dev *mdev, bool other_function,
u16 vport_number, u16 *gvmi)
{ … }