mlxsw: reg: Add ptps field in QoS ETS Element Configuration Register
The PTP Shaper field is used for enabling and disabling of port-rate based shaper which is slightly lower than port rate. Signed-off-by: Shalom Toledo <shalomt@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
cfe261c24e
Коммит
12f0e2e9ad
|
@ -3515,6 +3515,18 @@ MLXSW_ITEM32(reg, qeec, next_element_index, 0x08, 0, 8);
|
|||
*/
|
||||
MLXSW_ITEM32(reg, qeec, mise, 0x0C, 31, 1);
|
||||
|
||||
/* reg_qeec_ptps
|
||||
* PTP shaper
|
||||
* 0: regular shaper mode
|
||||
* 1: PTP oriented shaper
|
||||
* Allowed only for hierarchy 0
|
||||
* Not supported for CPU port
|
||||
* Note that ptps mode may affect the shaper rates of all hierarchies
|
||||
* Supported only on Spectrum-1
|
||||
* Access: RW
|
||||
*/
|
||||
MLXSW_ITEM32(reg, qeec, ptps, 0x0C, 29, 1);
|
||||
|
||||
enum {
|
||||
MLXSW_REG_QEEC_BYTES_MODE,
|
||||
MLXSW_REG_QEEC_PACKETS_MODE,
|
||||
|
@ -3601,6 +3613,16 @@ static inline void mlxsw_reg_qeec_pack(char *payload, u8 local_port,
|
|||
mlxsw_reg_qeec_next_element_index_set(payload, next_index);
|
||||
}
|
||||
|
||||
static inline void mlxsw_reg_qeec_ptps_pack(char *payload, u8 local_port,
|
||||
bool ptps)
|
||||
{
|
||||
MLXSW_REG_ZERO(qeec, payload);
|
||||
mlxsw_reg_qeec_local_port_set(payload, local_port);
|
||||
mlxsw_reg_qeec_element_hierarchy_set(payload,
|
||||
MLXSW_REG_QEEC_HIERARCY_PORT);
|
||||
mlxsw_reg_qeec_ptps_set(payload, ptps);
|
||||
}
|
||||
|
||||
/* QRWE - QoS ReWrite Enable
|
||||
* -------------------------
|
||||
* This register configures the rewrite enable per receive port.
|
||||
|
|
Загрузка…
Ссылка в новой задаче