Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6209998iob; Tue, 10 May 2022 12:55:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtKpywV9LL223kRmajKJ8QRsTbeyPKIgFoui2vgobrCwFZYS2TIjc+rwxqVAfFyF4/HuJ5 X-Received: by 2002:a17:902:7c90:b0:156:255:c571 with SMTP id y16-20020a1709027c9000b001560255c571mr22186691pll.15.1652212527645; Tue, 10 May 2022 12:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652212527; cv=none; d=google.com; s=arc-20160816; b=FIr8xpnh2P+0myUV8enOgJLht3vB7rwjd5BSDy5oQPvfpJXAYid6uoVaAp9zL9wkGj GtNTwzPF6u0UnfSfUqQI8HktLGLFB4hKR8Fwtl/3+fu/jXhf7wPC7B4ZluZgMEtWof/g KcyAeP2906eVoG6jh0WtZynMjczGq9w5dJQ9BHrdU1P/z9hf/ga2AJlv/C2xwlp5FNaC gYnRoceQ97QXg/z17QqJWl9HabibHy9B2AR4m3exj28JieqQ08Kosbnz3feTBeFjZrJs LlDI3927ZIP3Tl3mxJu1BKH+dLQuDEVbYJ1D4zQsZ30tMkmFde0kOtnbVT4pMB1mC54S vNRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ci06N1pSvXdFroEGysEeOKSYs0zxC4tQBUIN7oKsncU=; b=RuSTt2C3c5QN/x8sVGOTNItNrzklSsBa4F7CvkPwADx9P+nAVCy/OKgfMlF6hCTG1z 0KrGdX7N+66GMcjsEpzop/YILkV5k9oCfoRMQanVbbTPwpAkcUX402KJeZRl1pQJKaZp Y6eJC7IcuNHFbWZoOh59zKLjmoS21qtXJBccqRDknAIqIA3XRFIqz0ZuHvpEq5y+YfoT vVlfJgai0XSw3mqBTDytmUGJ91KWbRLflRzPWFKX3tg9OTVxM8zGlZzpYkR44IiTgln7 AdqWdV2uHKDEc79+n3mclrKxdOh8G+i97PzS5cEM7ZbNUJhgb42asnkjCds/IL+R8grf zVXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VhXzSqkj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t133-20020a63788b000000b003c219383924si237341pgc.465.2022.05.10.12.55.11; Tue, 10 May 2022 12:55:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VhXzSqkj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244547AbiEJNzS (ORCPT + 99 others); Tue, 10 May 2022 09:55:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244724AbiEJNh7 (ORCPT ); Tue, 10 May 2022 09:37:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70DBD55215; Tue, 10 May 2022 06:26:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DB274617FB; Tue, 10 May 2022 13:26:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D12EEC385A6; Tue, 10 May 2022 13:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652189175; bh=HPVP31vAjPkHUnU9b5hGIr1A908pgX7khXLUvHy4qUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VhXzSqkjGH043w7SPTJ/jiXGkC/mTuw6xaR+oZQs8/qZVWcgx7Qg8Ty2p+iUwTku1 zrpTYdsTpJMSoQxDyeg0d4kZ+oZOw7RYWw0KNjjl3lFMkAzckFg3JaAt8ZEsRoa+c+ ljHyI8FVnmebQMMMvXryveIQjF+6EazSpkvblO54= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Moshe Tal , Saeed Mahameed Subject: [PATCH 5.10 37/70] net/mlx5e: Fix trust state reset in reload Date: Tue, 10 May 2022 15:07:56 +0200 Message-Id: <20220510130733.949942723@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.861729621@linuxfoundation.org> References: <20220510130732.861729621@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Moshe Tal commit b781bff882d16175277ca129c382886cb4c74a2c upstream. Setting dscp2prio during the driver reload can cause dcb ieee app list to be not empty after the reload finish and as a result to a conflict between the priority trust state reported by the app and the state in the device register. Reset the dcb ieee app list on initialization in case this is conflicting with the register status. Fixes: 2a5e7a1344f4 ("net/mlx5e: Add dcbnl dscp to priority support") Signed-off-by: Moshe Tal Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c @@ -1210,6 +1210,16 @@ static int mlx5e_trust_initialize(struct if (err) return err; + if (priv->dcbx_dp.trust_state == MLX5_QPTS_TRUST_PCP && priv->dcbx.dscp_app_cnt) { + /* + * Align the driver state with the register state. + * Temporary state change is required to enable the app list reset. + */ + priv->dcbx_dp.trust_state = MLX5_QPTS_TRUST_DSCP; + mlx5e_dcbnl_delete_app(priv); + priv->dcbx_dp.trust_state = MLX5_QPTS_TRUST_PCP; + } + mlx5e_params_calc_trust_tx_min_inline_mode(priv->mdev, &priv->channels.params, priv->dcbx_dp.trust_state);