Add a handle to invoke the new FW capability of allocating a bulk of flow counters.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -1040,6 +1040,21 @@ enum { · 1039 unmodified lines | |||
| 1040 | MLX5_UCTX_CAP_INTERNAL_DEV_RES = 1UL << 1, | 1040 | MLX5_UCTX_CAP_INTERNAL_DEV_RES = 1UL << 1, |
| 1041 | }; | 1041 | }; |
| 1042 | 1042 | ||
| 1043 | #define MLX5_FC_BULK_SIZE_FACTOR 128 | ||
| 1044 | |||
| 1045 | enum mlx5_fc_bulk_alloc_bitmask { | ||
| 1046 | MLX5_FC_BULK_128 = (1 << 0), | ||
| 1047 | MLX5_FC_BULK_256 = (1 << 1), | ||
| 1048 | MLX5_FC_BULK_512 = (1 << 2), | ||
| 1049 | MLX5_FC_BULK_1024 = (1 << 3), | ||
| 1050 | MLX5_FC_BULK_2048 = (1 << 4), | ||
| 1051 | MLX5_FC_BULK_4096 = (1 << 5), | ||
| 1052 | MLX5_FC_BULK_8192 = (1 << 6), | ||
| 1053 | MLX5_FC_BULK_16384 = (1 << 7), | ||
| 1054 | }; | ||
| 1055 | |||
| 1056 | #define MLX5_FC_BULK_NUM_FCS(fc_enum) (MLX5_FC_BULK_SIZE_FACTOR * (fc_enum)) | ||
| 1057 | |||
| 1043 | struct mlx5_ifc_cmd_hca_cap_bits { | 1058 | struct mlx5_ifc_cmd_hca_cap_bits { |
| 1044 | u8 reserved_at_0[0x30]; | 1059 | u8 reserved_at_0[0x30]; |
| 1045 | u8 vhca_id[0x10]; | 1060 | u8 vhca_id[0x10]; |
| @@ -1244,7 +1259,8 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 198 unmodified lines | |||
| 1244 | u8 reserved_at_2e0[0x7]; | 1259 | u8 reserved_at_2e0[0x7]; |
| 1245 | u8 max_qp_mcg[0x19]; | 1260 | u8 max_qp_mcg[0x19]; |
| 1246 | 1261 | ||
| 1247 | u8 reserved_at_300[0x18]; | 1262 | u8 reserved_at_300[0x10]; |
| 1263 | u8 flow_counter_bulk_alloc[0x8]; | ||
| 1248 | u8 log_max_mcg[0x8]; | 1264 | u8 log_max_mcg[0x8]; |
| 1249 | 1265 | ||
| 1250 | u8 reserved_at_320[0x3]; | 1266 | u8 reserved_at_320[0x3]; |
| @@ -7815,7 +7831,8 @@ struct mlx5_ifc_alloc_flow_counter_in_bits { · 6564 unmodified lines | |||
| 7815 | u8 reserved_at_20[0x10]; | 7831 | u8 reserved_at_20[0x10]; |
| 7816 | u8 op_mod[0x10]; | 7832 | u8 op_mod[0x10]; |
| 7817 | 7833 | ||
| 7818 | u8 reserved_at_40[0x40]; | 7834 | u8 reserved_at_40[0x38]; |
| 7835 | u8 flow_counter_bulk[0x8]; | ||
| 7819 | }; | 7836 | }; |
| 7820 | 7837 | ||
| 7821 | struct mlx5_ifc_add_vxlan_udp_dport_out_bits { | 7838 | struct mlx5_ifc_add_vxlan_udp_dport_out_bits { |