]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
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)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:41:49 +0000 (19:41 -0600)
BugLink: https://bugs.launchpad.net/bugs/1835845
[ Upstream commit 2e8e70d249e8c5c79bf88bbb36bb68154ab15471 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c

index 0c6015ce85fd9e1db074a234aed9526d065c8099..f7c4feefaf2af4da12873b59ea01bdbc3ac2aba9 100644 (file)
@@ -1057,6 +1057,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;