OSDN Git Service

net/mlx5e: Set port trust mode to PCP as default
authorOr Gerlitz <ogerlitz@mellanox.com>
Thu, 19 Jul 2018 16:17:00 +0000 (16:17 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 31 Jul 2018 19:58:43 +0000 (12:58 -0700)
The hairpin offload code has dependency on the trust mode being PCP.

Hence we should set PCP as the default for handling cases where we are
disallowed to read the trust mode from the FW, or failed to initialize it.

Fixes: 106be53b6b0a ('net/mlx5e: Set per priority hairpin pairs')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c

index 86bc9ac..e33afa8 100644 (file)
@@ -1172,6 +1172,8 @@ static int mlx5e_trust_initialize(struct mlx5e_priv *priv)
        struct mlx5_core_dev *mdev = priv->mdev;
        int err;
 
+       priv->dcbx_dp.trust_state = MLX5_QPTS_TRUST_PCP;
+
        if (!MLX5_DSCP_SUPPORTED(mdev))
                return 0;