From patchwork Tue Jan 12 07:05:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 12012529 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 B2858C433E0 for ; Tue, 12 Jan 2021 07:15:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7921322CAD for ; Tue, 12 Jan 2021 07:15:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391922AbhALHPF (ORCPT ); Tue, 12 Jan 2021 02:15:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:37664 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388596AbhALHPE (ORCPT ); Tue, 12 Jan 2021 02:15:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DF57E22D06; Tue, 12 Jan 2021 07:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610435626; bh=m6jjF8CIJrv5Sle98gSrzR2yWnL6cpBnoG3HKr1TEDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oSoY2sGOPg/ntq35yjo9uxBvzVUIz+DCHJ1OEJOspVuXLoG3/JgSXWvJymhIuVPMp uYPm6jj99kQV9/F0FPN/emF5I4CMzRVFnK6kT5k1rCHDpugL9a1McbAHO3QSjV5Cux tmHGy3g4P1rxIcc2uGmZRMRHoE15EZ43oHXMulLzBdFXHC2sDHW4ZU1HfAtd/121nN lIj5oLg58np82n1SFg6uNaDJ25m0ykYY7oGVKvTZRm2mMmqus4MXn2jSMyjHsrpLIF hxO70iTaAvLjLh10iNPETJVfbNG+JQy3oB3btBVrZzIvW/F/hINqwdp2MwUW30AMd0 xNpljiU7IsgSQ== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Roi Dayan , Oz Shlomo , Paul Blakey , Saeed Mahameed Subject: [net-next V2 05/11] net/mlx5e: CT: Pass null instead of zero spec Date: Mon, 11 Jan 2021 23:05:28 -0800 Message-Id: <20210112070534.136841-6-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 No need to pass zero spec to mlx5_add_flow_rules() as the function can handle null spec. Signed-off-by: Roi Dayan Reviewed-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 3 +-- 1 file changed, 1 insertion(+), 2 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 072363e73f1c..97bfc42e3913 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c @@ -1241,9 +1241,8 @@ static int tc_ct_pre_ct_add_rules(struct mlx5_ct_ft *ct_ft, pre_ct->flow_rule = rule; /* add miss rule */ - memset(spec, 0, sizeof(*spec)); dest.ft = nat ? ct_priv->ct_nat : ct_priv->ct; - rule = mlx5_add_flow_rules(ft, spec, &flow_act, &dest, 1); + rule = mlx5_add_flow_rules(ft, NULL, &flow_act, &dest, 1); if (IS_ERR(rule)) { err = PTR_ERR(rule); ct_dbg("Failed to add pre ct miss rule zone %d", zone);