Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[platform/kernel/linux-starfive.git] / include / linux / mlx5 / mlx5_ifc.h
index fd7d083..8e87eb4 100644 (file)
@@ -442,7 +442,9 @@ struct mlx5_ifc_flow_table_prop_layout_bits {
        u8         max_modify_header_actions[0x8];
        u8         max_ft_level[0x8];
 
-       u8         reserved_at_40[0x20];
+       u8         reserved_at_40[0x6];
+       u8         execute_aso[0x1];
+       u8         reserved_at_47[0x19];
 
        u8         reserved_at_60[0x2];
        u8         reformat_insert[0x1];
@@ -940,7 +942,17 @@ struct mlx5_ifc_qos_cap_bits {
 
        u8         max_tsar_bw_share[0x20];
 
-       u8         reserved_at_100[0x700];
+       u8         reserved_at_100[0x20];
+
+       u8         reserved_at_120[0x3];
+       u8         log_meter_aso_granularity[0x5];
+       u8         reserved_at_128[0x3];
+       u8         log_meter_aso_max_alloc[0x5];
+       u8         reserved_at_130[0x3];
+       u8         log_max_num_meter_aso[0x5];
+       u8         reserved_at_138[0x8];
+
+       u8         reserved_at_140[0x6c0];
 };
 
 struct mlx5_ifc_debug_cap_bits {
@@ -1086,11 +1098,14 @@ struct mlx5_ifc_device_mem_cap_bits {
        u8         log_sw_icm_alloc_granularity[0x6];
        u8         log_steering_sw_icm_size[0x8];
 
-       u8         reserved_at_120[0x20];
+       u8         reserved_at_120[0x18];
+       u8         log_header_modify_pattern_sw_icm_size[0x8];
 
        u8         header_modify_sw_icm_start_address[0x40];
 
-       u8         reserved_at_180[0x80];
+       u8         reserved_at_180[0x40];
+
+       u8         header_modify_pattern_sw_icm_start_address[0x40];
 
        u8         memic_operations[0x20];
 
@@ -1426,7 +1441,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
 
        u8         reserved_at_120[0xa];
        u8         log_max_ra_req_dc[0x6];
-       u8         reserved_at_130[0xa];
+       u8         reserved_at_130[0x9];
+       u8         vnic_env_cq_overrun[0x1];
        u8         log_max_ra_res_dc[0x6];
 
        u8         reserved_at_140[0x5];
@@ -1621,7 +1637,11 @@ struct mlx5_ifc_cmd_hca_cap_bits {
        u8         nic_receive_steering_discard[0x1];
        u8         receive_discard_vport_down[0x1];
        u8         transmit_discard_vport_down[0x1];
-       u8         reserved_at_343[0x5];
+       u8         eq_overrun_count[0x1];
+       u8         reserved_at_344[0x1];
+       u8         invalid_command_count[0x1];
+       u8         quota_exceeded_count[0x1];
+       u8         reserved_at_347[0x1];
        u8         log_max_flow_counter_bulk[0x8];
        u8         max_flow_counter_15_0[0x10];
 
@@ -1719,7 +1739,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
        u8         log_max_dci_errored_streams[0x5];
        u8         reserved_at_598[0x8];
 
-       u8         reserved_at_5a0[0x13];
+       u8         reserved_at_5a0[0x10];
+       u8         enhanced_cqe_compression[0x1];
+       u8         reserved_at_5b1[0x2];
        u8         log_max_dek[0x5];
        u8         reserved_at_5b8[0x4];
        u8         mini_cqe_resp_stride_index[0x1];
@@ -3277,6 +3299,7 @@ enum {
        MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH_2 = 0x800,
        MLX5_FLOW_CONTEXT_ACTION_IPSEC_DECRYPT = 0x1000,
        MLX5_FLOW_CONTEXT_ACTION_IPSEC_ENCRYPT = 0x2000,
+       MLX5_FLOW_CONTEXT_ACTION_EXECUTE_ASO = 0x4000,
 };
 
 enum {
@@ -3292,6 +3315,38 @@ struct mlx5_ifc_vlan_bits {
        u8         vid[0xc];
 };
 
+enum {
+       MLX5_FLOW_METER_COLOR_RED       = 0x0,
+       MLX5_FLOW_METER_COLOR_YELLOW    = 0x1,
+       MLX5_FLOW_METER_COLOR_GREEN     = 0x2,
+       MLX5_FLOW_METER_COLOR_UNDEFINED = 0x3,
+};
+
+enum {
+       MLX5_EXE_ASO_FLOW_METER         = 0x2,
+};
+
+struct mlx5_ifc_exe_aso_ctrl_flow_meter_bits {
+       u8        return_reg_id[0x4];
+       u8        aso_type[0x4];
+       u8        reserved_at_8[0x14];
+       u8        action[0x1];
+       u8        init_color[0x2];
+       u8        meter_id[0x1];
+};
+
+union mlx5_ifc_exe_aso_ctrl {
+       struct mlx5_ifc_exe_aso_ctrl_flow_meter_bits exe_aso_ctrl_flow_meter;
+};
+
+struct mlx5_ifc_execute_aso_bits {
+       u8        valid[0x1];
+       u8        reserved_at_1[0x7];
+       u8        aso_object_id[0x18];
+
+       union mlx5_ifc_exe_aso_ctrl exe_aso_ctrl;
+};
+
 struct mlx5_ifc_flow_context_bits {
        struct mlx5_ifc_vlan_bits push_vlan;
 
@@ -3323,7 +3378,9 @@ struct mlx5_ifc_flow_context_bits {
 
        struct mlx5_ifc_fte_match_param_bits match_value;
 
-       u8         reserved_at_1200[0x600];
+       struct mlx5_ifc_execute_aso_bits execute_aso[4];
+
+       u8         reserved_at_1300[0x500];
 
        union mlx5_ifc_dest_format_struct_flow_counter_list_auto_bits destination[];
 };
@@ -3391,11 +3448,21 @@ struct mlx5_ifc_vnic_diagnostic_statistics_bits {
 
        u8         transmit_discard_vport_down[0x40];
 
-       u8         reserved_at_140[0xa0];
+       u8         async_eq_overrun[0x20];
+
+       u8         comp_eq_overrun[0x20];
+
+       u8         reserved_at_180[0x20];
+
+       u8         invalid_command[0x20];
+
+       u8         quota_exceeded_command[0x20];
 
        u8         internal_rq_out_of_buffer[0x20];
 
-       u8         reserved_at_200[0xe00];
+       u8         cq_overrun[0x20];
+
+       u8         reserved_at_220[0xde0];
 };
 
 struct mlx5_ifc_traffic_counter_bits {
@@ -4074,7 +4141,8 @@ struct mlx5_ifc_cqc_bits {
        u8         cqe_comp_en[0x1];
        u8         mini_cqe_res_format[0x2];
        u8         st[0x4];
-       u8         reserved_at_18[0x8];
+       u8         reserved_at_18[0x6];
+       u8         cqe_compression_layout[0x2];
 
        u8         reserved_at_20[0x20];
 
@@ -5970,7 +6038,9 @@ struct mlx5_ifc_general_obj_in_cmd_hdr_bits {
 
        u8         obj_id[0x20];
 
-       u8         reserved_at_60[0x20];
+       u8         reserved_at_60[0x3];
+       u8         log_obj_range[0x5];
+       u8         reserved_at_68[0x18];
 };
 
 struct mlx5_ifc_general_obj_out_cmd_hdr_bits {
@@ -11370,12 +11440,14 @@ enum {
        MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = BIT_ULL(0xc),
        MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_IPSEC = BIT_ULL(0x13),
        MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_SAMPLER = BIT_ULL(0x20),
+       MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_FLOW_METER_ASO = BIT_ULL(0x24),
 };
 
 enum {
        MLX5_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = 0xc,
        MLX5_GENERAL_OBJECT_TYPES_IPSEC = 0x13,
        MLX5_GENERAL_OBJECT_TYPES_SAMPLER = 0x20,
+       MLX5_GENERAL_OBJECT_TYPES_FLOW_METER_ASO = 0x24,
 };
 
 enum {
@@ -11448,6 +11520,61 @@ struct mlx5_ifc_create_encryption_key_in_bits {
        struct mlx5_ifc_encryption_key_obj_bits encryption_key_object;
 };
 
+enum {
+       MLX5_FLOW_METER_MODE_BYTES_IP_LENGTH            = 0x0,
+       MLX5_FLOW_METER_MODE_BYTES_CALC_WITH_L2         = 0x1,
+       MLX5_FLOW_METER_MODE_BYTES_CALC_WITH_L2_IPG     = 0x2,
+       MLX5_FLOW_METER_MODE_NUM_PACKETS                = 0x3,
+};
+
+struct mlx5_ifc_flow_meter_parameters_bits {
+       u8         valid[0x1];
+       u8         bucket_overflow[0x1];
+       u8         start_color[0x2];
+       u8         both_buckets_on_green[0x1];
+       u8         reserved_at_5[0x1];
+       u8         meter_mode[0x2];
+       u8         reserved_at_8[0x18];
+
+       u8         reserved_at_20[0x20];
+
+       u8         reserved_at_40[0x3];
+       u8         cbs_exponent[0x5];
+       u8         cbs_mantissa[0x8];
+       u8         reserved_at_50[0x3];
+       u8         cir_exponent[0x5];
+       u8         cir_mantissa[0x8];
+
+       u8         reserved_at_60[0x20];
+
+       u8         reserved_at_80[0x3];
+       u8         ebs_exponent[0x5];
+       u8         ebs_mantissa[0x8];
+       u8         reserved_at_90[0x3];
+       u8         eir_exponent[0x5];
+       u8         eir_mantissa[0x8];
+
+       u8         reserved_at_a0[0x60];
+};
+
+struct mlx5_ifc_flow_meter_aso_obj_bits {
+       u8         modify_field_select[0x40];
+
+       u8         reserved_at_40[0x40];
+
+       u8         reserved_at_80[0x8];
+       u8         meter_aso_access_pd[0x18];
+
+       u8         reserved_at_a0[0x160];
+
+       struct mlx5_ifc_flow_meter_parameters_bits flow_meter_parameters[2];
+};
+
+struct mlx5_ifc_create_flow_meter_aso_obj_in_bits {
+       struct mlx5_ifc_general_obj_in_cmd_hdr_bits hdr;
+       struct mlx5_ifc_flow_meter_aso_obj_bits flow_meter_aso_obj;
+};
+
 struct mlx5_ifc_sampler_obj_bits {
        u8         modify_field_select[0x40];