From mboxrd@z Thu Jan 1 00:00:00 1970 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.7 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 36360C4338F for ; Tue, 3 Aug 2021 02:29:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CBDB60EE8 for ; Tue, 3 Aug 2021 02:29:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233799AbhHCC3d (ORCPT ); Mon, 2 Aug 2021 22:29:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:59004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233734AbhHCC3P (ORCPT ); Mon, 2 Aug 2021 22:29:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DC0D46104F; Tue, 3 Aug 2021 02:29:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627957745; bh=rFbkdESyCwjipUwFn+bp7eGWdVTP50w8+/uMZGp2bEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dUpydPgzL8jaGw4drgNXA1H+cpoCkrLkhYuwJocXXt9dc9kYj6wEOXjwzJaSHM4Yx VhiSjgNmGIZrXbePA5f+qA3S5LeP4CRp+v1Khj1/u6mn9V/FuOcF/a05ayDc+UuxVY eKxHGLcmhSQdWoSHPQnGzj3GySL69xv+NbY4ABZzjWMT9e98LOUq4ihYzNuxoPTNC3 E0TvDxf07MbnzwBPrUYiXw+1a9jqTayS53+uGA+4w/Mg50ZSAUEWjGvHCjQx30AWA5 ol9WxuSF65DKi2YD3yyVz/2ZlWJ5Jp5vLxhZxWS0KW/ujiKbiEL5P8jMBqlWCIpbBK bUWjY3eAd1vaA== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Roi Dayan , Maor Dickman , Saeed Mahameed Subject: [net-next 12/16] net/mlx5e: Remove redundant cap check for flow counter Date: Mon, 2 Aug 2021 19:28:49 -0700 Message-Id: <20210803022853.106973-13-saeed@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210803022853.106973-1-saeed@kernel.org> References: <20210803022853.106973-1-saeed@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Roi Dayan The cap is very old and today will always exists. The cap is not being checked anywhere else. Remove the check from drop action when parsing tc rules in nic mode. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index f4f8a6728e95..3453f37a0741 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -3356,10 +3356,8 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv, MLX5_FLOW_CONTEXT_ACTION_COUNT; break; case FLOW_ACTION_DROP: - action |= MLX5_FLOW_CONTEXT_ACTION_DROP; - if (MLX5_CAP_FLOWTABLE(priv->mdev, - flow_table_properties_nic_receive.flow_counter)) - action |= MLX5_FLOW_CONTEXT_ACTION_COUNT; + action |= MLX5_FLOW_CONTEXT_ACTION_DROP | + MLX5_FLOW_CONTEXT_ACTION_COUNT; break; case FLOW_ACTION_MANGLE: case FLOW_ACTION_ADD: -- 2.31.1