aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2018-10-11 03:48:04 -0400
committerDavid S. Miller <davem@davemloft.net>2018-10-11 13:08:23 -0400
commitfd6db27cacd29a9d11616f76456e574c8e3a6db3 (patch)
treeed2aefd8904f6b823c7398fba18f6c06d7c123c7
parenta77d5f0bde4e95eb9c95bf416fa03d996b16ed67 (diff)
mlxsw: reg: Add Tunneling NVE QoS Configuration Register
The register configures how QoS is set in Encapsulation into the underlay network. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/reg.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index 915a6e241168..28fe45783824 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -8566,6 +8566,31 @@ static inline void mlxsw_reg_tnumt_pack(char *payload,
8566 mlxsw_reg_tnumt_record_size_set(payload, record_size); 8566 mlxsw_reg_tnumt_record_size_set(payload, record_size);
8567} 8567}
8568 8568
8569/* TNQCR - Tunneling NVE QoS Configuration Register
8570 * ------------------------------------------------
8571 * The TNQCR register configures how QoS is set in encapsulation into the
8572 * underlay network.
8573 */
8574#define MLXSW_REG_TNQCR_ID 0xA010
8575#define MLXSW_REG_TNQCR_LEN 0x0C
8576
8577MLXSW_REG_DEFINE(tnqcr, MLXSW_REG_TNQCR_ID, MLXSW_REG_TNQCR_LEN);
8578
8579/* reg_tnqcr_enc_set_dscp
8580 * For encapsulation: How to set DSCP field:
8581 * 0 - Copy the DSCP from the overlay (inner) IP header to the underlay
8582 * (outer) IP header. If there is no IP header, use TNQDR.dscp
8583 * 1 - Set the DSCP field as TNQDR.dscp
8584 * Access: RW
8585 */
8586MLXSW_ITEM32(reg, tnqcr, enc_set_dscp, 0x04, 28, 1);
8587
8588static inline void mlxsw_reg_tnqcr_pack(char *payload)
8589{
8590 MLXSW_REG_ZERO(tnqcr, payload);
8591 mlxsw_reg_tnqcr_enc_set_dscp_set(payload, 0);
8592}
8593
8569/* TNEEM - Tunneling NVE Encapsulation ECN Mapping Register 8594/* TNEEM - Tunneling NVE Encapsulation ECN Mapping Register
8570 * -------------------------------------------------------- 8595 * --------------------------------------------------------
8571 * The TNEEM register maps ECN of the IP header at the ingress to the 8596 * The TNEEM register maps ECN of the IP header at the ingress to the
@@ -9248,6 +9273,7 @@ static const struct mlxsw_reg_info *mlxsw_reg_infos[] = {
9248 MLXSW_REG(mgpc), 9273 MLXSW_REG(mgpc),
9249 MLXSW_REG(tngcr), 9274 MLXSW_REG(tngcr),
9250 MLXSW_REG(tnumt), 9275 MLXSW_REG(tnumt),
9276 MLXSW_REG(tnqcr),
9251 MLXSW_REG(tneem), 9277 MLXSW_REG(tneem),
9252 MLXSW_REG(tndem), 9278 MLXSW_REG(tndem),
9253 MLXSW_REG(tnpc), 9279 MLXSW_REG(tnpc),