From patchwork Tue Jan 12 07:05:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 12012523 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 709A7C433E6 for ; Tue, 12 Jan 2021 07:14:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35C1322AAF for ; Tue, 12 Jan 2021 07:14:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391895AbhALHOZ (ORCPT ); Tue, 12 Jan 2021 02:14:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:37558 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391883AbhALHOY (ORCPT ); Tue, 12 Jan 2021 02:14:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1E42622CE3; Tue, 12 Jan 2021 07:13:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610435624; bh=PRD0C0CukMOoliU1TJTVvJ7qCD21WQBO6LpD3X7upIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R+MpJw3nv1SU6EjyvqCMk2WnXabc4URSB87dJm3AbqRkGqpDSxz6H0KdGp4v9C6qd tDtN4wZbdovA1dncw1RL0mp/onb528UndmZVaNbQlTG3GU9jHBLPLcpv7hq1PNPu7y Ti7Nw+ZP43zDQ+u8F/6TeMwDpkjMGM3xe8kjZjeQ5DkAfcDOPxq/eRr3Lcwrh2wN32 MViLJtctv/louy+aHrCP4P14TSdyFR5TCgj4PFz2G4UMkjhP0kAjOu/K3LPdaxYkjO wx762ycxn5SfJ5UbB07jYVYPU8Uxc2wgh3UfmzP2x3q+9jCwpAopHSGzTdSS58Oike 0zy9MM7wM5iKw== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Eli Cohen , Roi Dayan , Saeed Mahameed Subject: [net-next V2 02/11] net/mlx5e: Simplify condition on esw_vport_enable_qos() Date: Mon, 11 Jan 2021 23:05:25 -0800 Message-Id: <20210112070534.136841-3-saeed@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210112070534.136841-1-saeed@kernel.org> References: <20210112070534.136841-1-saeed@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Eli Cohen esw->qos.enabled will only be true if both MLX5_CAP_GEN(dev, qos) and MLX5_CAP_QOS(dev, esw_scheduling) are true. Therefore, remove them from the condition in and rely only on esw->qos.enabled. Fixes: 1bd27b11c1df ("net/mlx5: Introduce E-switch QoS management") Signed-off-by: Eli Cohen Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index da901e364656..876e6449edb3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -1042,8 +1042,7 @@ static int esw_vport_enable_qos(struct mlx5_eswitch *esw, void *vport_elem; int err = 0; - if (!esw->qos.enabled || !MLX5_CAP_GEN(dev, qos) || - !MLX5_CAP_QOS(dev, esw_scheduling)) + if (!esw->qos.enabled) return 0; if (vport->qos.enabled)