From patchwork Tue Aug 3 02:28:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 491411 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 267B7C432BE for ; Tue, 3 Aug 2021 02:29:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F9EF61037 for ; Tue, 3 Aug 2021 02:29:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233875AbhHCC3c (ORCPT ); Mon, 2 Aug 2021 22:29:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:58990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233732AbhHCC3O (ORCPT ); Mon, 2 Aug 2021 22:29:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5E51361051; 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=1627957744; bh=TlTfOn3YPWLZYDub0dDiPfrtkvr2O82vlLVq8ijJDK0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HPwagfTSdsTmlJ9n71r4jmXTrs2RFolbffMb7aFmfDaOSrXL3hPEnW3jYvqtINOHQ lb9Eej0rz7Es14XeyQ1EsDPYu2RRQPznKEOCx2IFynHAp+eeIOLMwXYDWc+j6ZXNfG lXOeeDQgNSXPOsKeHye0yajywzS2R7woMRtUWFOW5ebaYFcrfagK+vpXWnBQOLjx75 Q8M69mOvHCGzq1GYVjyeGeHO+kl68sgY8GcEA1fWxintyyxwn9JQ0titv58kz+J8BE 8wCJ4cpl/uK6wpuZuXyUUwpbeORB/hTWZT+XJFcYyKqz+M5yRMM9FsvRLmaWDcjqNe hGIq1+ebOapYg== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Roi Dayan , Maor Dickman , Saeed Mahameed Subject: [net-next 11/16] net/mlx5e: Remove redundant filter_dev arg from parse_tc_fdb_actions() Date: Mon, 2 Aug 2021 19:28:48 -0700 Message-Id: <20210803022853.106973-12-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 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Roi Dayan filter_dev is saved in parse_attr. and being used in other cases from there. use it also for the leftover case. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 7 +++---- 1 file changed, 3 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 9671fb0e1432..f4f8a6728e95 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -3707,8 +3707,7 @@ static int verify_uplink_forwarding(struct mlx5e_priv *priv, static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct flow_action *flow_action, struct mlx5e_tc_flow *flow, - struct netlink_ext_ack *extack, - struct net_device *filter_dev) + struct netlink_ext_ack *extack) { struct pedit_headers_action hdrs[2] = {}; struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; @@ -3773,7 +3772,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, "mpls pop supported only as first action"); return -EOPNOTSUPP; } - if (!netif_is_bareudp(filter_dev)) { + if (!netif_is_bareudp(parse_attr->filter_dev)) { NL_SET_ERR_MSG_MOD(extack, "mpls pop supported only on bareudp devices"); return -EOPNOTSUPP; @@ -4275,7 +4274,7 @@ __mlx5e_add_fdb_flow(struct mlx5e_priv *priv, if (err) goto err_free; - err = parse_tc_fdb_actions(priv, &rule->action, flow, extack, filter_dev); + err = parse_tc_fdb_actions(priv, &rule->action, flow, extack); if (err) goto err_free;