From patchwork Tue Jan 12 07:05:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 12012541 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 1A068C433DB for ; Tue, 12 Jan 2021 07:15:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD40522CAD for ; Tue, 12 Jan 2021 07:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391956AbhALHPQ (ORCPT ); Tue, 12 Jan 2021 02:15:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:37668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391911AbhALHPE (ORCPT ); Tue, 12 Jan 2021 02:15:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F102022CAD; Tue, 12 Jan 2021 07:13:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610435627; bh=nIUc+HFf+UVM6UfIHdNs2NUCY5Z6eliRTtSTHmYyE54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mLnK2Y5eVkbtuxbvdNw+WjFXe+JqiZ4vsY1LA0QeYOReq/ugzOSm6qqAFOjDPWFrO bNs9XDHgmJlQiD9AGRFgY+sfkCCNk1KsMfqLVr81lVZJgPLemHEcAhy0jGd7avY6bK ZXAmTBcZwNkRoZsuGL+61mGkHc9MAAf0PQ0cH2urwRlSDs7wvilrccGuSG/AuAX4kk dg0tHv9qkDiwvkBvd0mvnrjPTCd/XdWjcd8yPu2SnJAN8kaGrjcI5RKUWdAaL++0UQ drLNZ7SV386uijBOlImyI7O4quRgR/LGLlFntuRmA0Zzs5W7aoXT8XZ8+6zySYy+h4 iYFpCH527CvzQ== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Roi Dayan , Paul Blakey , Saeed Mahameed Subject: [net-next V2 07/11] net/mlx5e: CT: Remove redundant usage of zone mask Date: Mon, 11 Jan 2021 23:05:30 -0800 Message-Id: <20210112070534.136841-8-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: Roi Dayan The zone member is of type u16 so there is no reason to apply the zone mask on it. This is also matching the call to set a match in other places which don't need and don't apply the mask. Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c index 97bfc42e3913..e20c1da95a33 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c @@ -705,9 +705,7 @@ mlx5_tc_ct_entry_add_rule(struct mlx5_tc_ct_priv *ct_priv, attr->flags |= MLX5_ESW_ATTR_FLAG_NO_IN_PORT; mlx5_tc_ct_set_tuple_match(netdev_priv(ct_priv->netdev), spec, flow_rule); - mlx5e_tc_match_to_reg_match(spec, ZONE_TO_REG, - entry->tuple.zone & MLX5_CT_ZONE_MASK, - MLX5_CT_ZONE_MASK); + mlx5e_tc_match_to_reg_match(spec, ZONE_TO_REG, entry->tuple.zone, MLX5_CT_ZONE_MASK); zone_rule->rule = mlx5_tc_rule_insert(priv, spec, attr); if (IS_ERR(zone_rule->rule)) {