diff options
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/fw_qos.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw_qos.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw_qos.h b/drivers/net/ethernet/mellanox/mlx4/fw_qos.h index be79951c44ef..b3fffafff062 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw_qos.h +++ b/drivers/net/ethernet/mellanox/mlx4/fw_qos.h | |||
@@ -41,6 +41,12 @@ | |||
41 | #define MLX4_NUM_UP 8 | 41 | #define MLX4_NUM_UP 8 |
42 | #define MLX4_NUM_TC 8 | 42 | #define MLX4_NUM_TC 8 |
43 | 43 | ||
44 | struct mlx4_vport_qos_param { | ||
45 | u32 bw_share; | ||
46 | u32 max_avg_bw; | ||
47 | u8 enable; | ||
48 | }; | ||
49 | |||
44 | /** | 50 | /** |
45 | * mlx4_SET_PORT_PRIO2TC - This routine maps user priorities to traffic | 51 | * mlx4_SET_PORT_PRIO2TC - This routine maps user priorities to traffic |
46 | * classes of a given port and device. | 52 | * classes of a given port and device. |
@@ -100,4 +106,34 @@ int mlx4_ALLOCATE_VPP_get(struct mlx4_dev *dev, u8 port, | |||
100 | **/ | 106 | **/ |
101 | int mlx4_ALLOCATE_VPP_set(struct mlx4_dev *dev, u8 port, u8 *vpp_p_up); | 107 | int mlx4_ALLOCATE_VPP_set(struct mlx4_dev *dev, u8 port, u8 *vpp_p_up); |
102 | 108 | ||
109 | /** | ||
110 | * mlx4_SET_VPORT_QOS_get - Query QoS proporties of a Vport. | ||
111 | * Each priority allowed for the Vport is assigned with a share of the BW, | ||
112 | * and a BW limitation. This commands query the current QoS values. | ||
113 | * | ||
114 | * @dev: mlx4_dev. | ||
115 | * @port: Physical port number. | ||
116 | * @vport: Vport id. | ||
117 | * @out_param: Array of mlx4_vport_qos_param that will contain the values. | ||
118 | * | ||
119 | * Returns 0 on success or a negative mlx4_core errno code. | ||
120 | **/ | ||
121 | int mlx4_SET_VPORT_QOS_get(struct mlx4_dev *dev, u8 port, u8 vport, | ||
122 | struct mlx4_vport_qos_param *out_param); | ||
123 | |||
124 | /** | ||
125 | * mlx4_SET_VPORT_QOS_set - Set QoS proporties of a Vport. | ||
126 | * QoS parameters can be modified at any time, but must be initialized | ||
127 | * before any QP is associated with the VPort. | ||
128 | * | ||
129 | * @dev: mlx4_dev. | ||
130 | * @port: Physical port number. | ||
131 | * @vport: Vport id. | ||
132 | * @out_param: Array of mlx4_vport_qos_param which holds the requested values. | ||
133 | * | ||
134 | * Returns 0 on success or a negative mlx4_core errno code. | ||
135 | **/ | ||
136 | int mlx4_SET_VPORT_QOS_set(struct mlx4_dev *dev, u8 port, u8 vport, | ||
137 | struct mlx4_vport_qos_param *in_param); | ||
138 | |||
103 | #endif /* MLX4_FW_QOS_H */ | 139 | #endif /* MLX4_FW_QOS_H */ |