mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
net/mlx5: Introduce physical port TC/prio access functions
Add access functions to set and query a physical port TC groups and prio parameters. Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ad909eb064
commit
4f3961eeaf
4 changed files with 132 additions and 1 deletions
|
|
@ -99,6 +99,8 @@ enum {
|
|||
};
|
||||
|
||||
enum {
|
||||
MLX5_REG_QETCR = 0x4005,
|
||||
MLX5_REG_QTCT = 0x400a,
|
||||
MLX5_REG_PCAP = 0x5001,
|
||||
MLX5_REG_PMTU = 0x5003,
|
||||
MLX5_REG_PTYS = 0x5004,
|
||||
|
|
|
|||
|
|
@ -729,7 +729,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
|
|||
|
||||
u8 reserved_at_1bf[0x3];
|
||||
u8 log_max_msg[0x5];
|
||||
u8 reserved_at_1c7[0x18];
|
||||
u8 reserved_at_1c7[0x4];
|
||||
u8 max_tc[0x4];
|
||||
u8 reserved_at_1cf[0x10];
|
||||
|
||||
u8 stat_rate_support[0x10];
|
||||
u8 reserved_at_1ef[0xc];
|
||||
|
|
@ -7061,4 +7063,49 @@ struct mlx5_ifc_modify_flow_table_in_bits {
|
|||
u8 reserved_at_100[0x100];
|
||||
};
|
||||
|
||||
struct mlx5_ifc_ets_tcn_config_reg_bits {
|
||||
u8 g[0x1];
|
||||
u8 b[0x1];
|
||||
u8 r[0x1];
|
||||
u8 reserved_at_3[0x9];
|
||||
u8 group[0x4];
|
||||
u8 reserved_at_10[0x9];
|
||||
u8 bw_allocation[0x7];
|
||||
|
||||
u8 reserved_at_20[0xc];
|
||||
u8 max_bw_units[0x4];
|
||||
u8 reserved_at_30[0x8];
|
||||
u8 max_bw_value[0x8];
|
||||
};
|
||||
|
||||
struct mlx5_ifc_ets_global_config_reg_bits {
|
||||
u8 reserved_at_0[0x2];
|
||||
u8 r[0x1];
|
||||
u8 reserved_at_3[0x1d];
|
||||
|
||||
u8 reserved_at_20[0xc];
|
||||
u8 max_bw_units[0x4];
|
||||
u8 reserved_at_30[0x8];
|
||||
u8 max_bw_value[0x8];
|
||||
};
|
||||
|
||||
struct mlx5_ifc_qetc_reg_bits {
|
||||
u8 reserved_at_0[0x8];
|
||||
u8 port_number[0x8];
|
||||
u8 reserved_at_10[0x30];
|
||||
|
||||
struct mlx5_ifc_ets_tcn_config_reg_bits tc_configuration[0x8];
|
||||
struct mlx5_ifc_ets_global_config_reg_bits global_configuration;
|
||||
};
|
||||
|
||||
struct mlx5_ifc_qtct_reg_bits {
|
||||
u8 reserved_at_0[0x8];
|
||||
u8 port_number[0x8];
|
||||
u8 reserved_at_10[0xd];
|
||||
u8 prio[0x3];
|
||||
|
||||
u8 reserved_at_20[0x1d];
|
||||
u8 tclass[0x3];
|
||||
};
|
||||
|
||||
#endif /* MLX5_IFC_H */
|
||||
|
|
|
|||
|
|
@ -70,4 +70,10 @@ int mlx5_set_port_pfc(struct mlx5_core_dev *dev, u8 pfc_en_tx, u8 pfc_en_rx);
|
|||
int mlx5_query_port_pfc(struct mlx5_core_dev *dev, u8 *pfc_en_tx,
|
||||
u8 *pfc_en_rx);
|
||||
|
||||
int mlx5_max_tc(struct mlx5_core_dev *mdev);
|
||||
|
||||
int mlx5_set_port_prio_tc(struct mlx5_core_dev *mdev, u8 *prio_tc);
|
||||
int mlx5_set_port_tc_group(struct mlx5_core_dev *mdev, u8 *tc_group);
|
||||
int mlx5_set_port_tc_bw_alloc(struct mlx5_core_dev *mdev, u8 *tc_bw);
|
||||
|
||||
#endif /* __MLX5_PORT_H__ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue