From patchwork Wed Jun 24 02:18:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 217226 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=-10.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, 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 D8754C433E0 for ; Wed, 24 Jun 2020 02:21:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABF3520CC7 for ; Wed, 24 Jun 2020 02:21:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="nr01D/kH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388187AbgFXCVP (ORCPT ); Tue, 23 Jun 2020 22:21:15 -0400 Received: from mail-eopbgr60051.outbound.protection.outlook.com ([40.107.6.51]:63460 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387898AbgFXCVO (ORCPT ); Tue, 23 Jun 2020 22:21:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UwUmUkAl6l/u4Loi8ir3BuFo0PJpoQPcUbdNF5bH76STUb4UXFdCsIUpd8KiiQnyLkmU+9/V+lcCNGXQbucRtVv4fWTWH+GP5JkJyf6GjBgPoSBoLrfaaGSg2GPB/u8T6cgm9x/F56To/wQYWxlFPxJ141Uxx9CjbsgeqqW9uSXTW/PvZvfD7r/46cxIU5yppgiSrlC7VLDIxgTPTsdGSLymwlRAdnI+Z2NfpS7v7c6tlaoxXKIwjo5ZUL8sEBoQ+jE5YUckEdE5GSDTQ3LChgLOf3QjEnAbnUHu/8UVAxaS4cBkKEUfVvR7kvFA/0IX+fxYVT2WKY31Wprh3Pj+Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cvKzaRmOsLxjnvu6DyvBKkNP2RRBc1o5N8JkUbB/So8=; b=AZGHRj04RtRhvMyefOUtXz9DZZdCr3p+jI080KyVPtG0GV2ZrEe2ct7335HcMYjzdTLLTZGcCuFYSGyVzOuRv6fw9JZXq9Yrg8iKHZWq/4+cpGQR0YBb3XPUcNBzFozBCardQWFqVY9k/19e09D7mWyc+EjTG6eZi+5wB6InUNPjsSk2vMO/ONM8UDwtKy+bZ7AXLEzmCrBbdjpav0eYqtycDgceowL9STEyN0xJGl3eGDAZvcl1mJW2g0VpUCE5Br6sb4JPAjyAq1/RCnrAl0Qu1gNbDfygmmtcOrQZKZqugvZ6sLmnpwdbj0C4IDxjNR3fWM93KMDimSSuaHr4Rg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cvKzaRmOsLxjnvu6DyvBKkNP2RRBc1o5N8JkUbB/So8=; b=nr01D/kH9JCr0slaTUPCiW0xjVDOTZG9HaKKp25U7XGsotjGh3JwrLzbYIG4xHx1DlXA8SZHOF8wMPF6CiUG/Q1NoZDl7hA3K1NpY3PAN/EbOjzHcjDCuiPNya70U7smdIyHch0LipRQdmtwWN3h7ugSh793zJYnFDG6YygkK7w= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none; davemloft.net; dmarc=none action=none header.from=mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB7022.eurprd05.prod.outlook.com (2603:10a6:800:184::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 02:21:09 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c%2]) with mapi id 15.20.3131.020; Wed, 24 Jun 2020 02:21:09 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Parav Pandit , Saeed Mahameed Subject: [net-next V2 01/10] net/mlx5: Avoid eswitch header inclusion in fs core layer Date: Tue, 23 Jun 2020 19:18:16 -0700 Message-Id: <20200624021825.53707-2-saeedm@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200624021825.53707-1-saeedm@mellanox.com> References: <20200624021825.53707-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 02:21:07 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8d4a35bd-3453-443e-0b7c-08d817e541dd X-MS-TrafficTypeDiagnostic: VI1PR05MB7022: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-Forefront-PRVS: 0444EB1997 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KEQLSLtlqgQwov4jDAeOfaJhdz+8dr10bmVFhTiV4oI8L54BlkRe/OEM6JG25eSt2xOBJfSLVKE/tIKXuz0X5nLi8kAm8zlfnNN2aqUn3XA8UtXN0T86sBvbisOj+vtnrAMQIMJ5G/xFmcQFqBa8/xej9EqiYL1TF7z1eLycHh6sY0cV1wKvHxAc7X93VH7DKWjxmwpbDgsdGNrgiKpQbQBZLX+oI5OdnMBmoFLEgmGOk9mruCXi4lHCv/oQNwTgOQ/Tp0LnZnQtRlZKEps4cT1n9CQv5sP9s2QuXBq/Ue3S6RG5iy59QZQGh2ye8sO9GB/ZWUKdQl+3JHNOHx5F841FUUcthRpWaf8cMvHxMLDYg8rtV527nAyiAxGuawsv X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB5102.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(8936002)(316002)(478600001)(107886003)(2906002)(2616005)(16526019)(956004)(6666004)(186003)(1076003)(26005)(4326008)(8676002)(5660300002)(6486002)(66556008)(66476007)(83380400001)(6512007)(66946007)(52116002)(6506007)(86362001)(36756003)(54906003)(54420400002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: bDWAUPXXXLHewkc9moCtKhVJt90aUNnjCmlqW+yw97/IBoqwGGXdk1FrVMsCNGhmJANI1d6n+PnKjMFeXmIDneC81vpL3+QGwwMMGxFvA8KPq7N/gdKjM6RsQeR5OnRYn4DJpPHKgn5dOekSXhFw5x0xvSHuTGjLmsFrI5Ke3JO+tFk1+fKm+CHgPhkIuLEe0OebIGvefUZFsy15Rpeg/FRFTF65hZatsUtiTyfkhlMOQlSaLc8I5UcDq2fGqmT5crfrDDGtdMf6SLdbSwilijtLt8qOMYzQXwIUpUSyz/eKiaQTRIhM95RnlM3HobQU61XEjhIRTqy22CDLnvcaNN19uK5XvnjQY465DWdfelEibJJcBH5q1TVnq85qgc7fEUEMqo3rnajZxgyD+d5mH3YXI2PKpsWDf/8JEQjtBrds9kzA33T8rZKOzJ6BOytb6vsKa1pon2HA/INXM0tNOA5T59k1UPBxHCNl74jZKuI= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d4a35bd-3453-443e-0b7c-08d817e541dd X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 02:21:09.5078 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3nr9l3wBI5FOG+E/TSuqGhhbzFldqAlEez1VDJzq70ds46n31VoUY/RAy7RnCc///cE/GVJS0u1BnScO1jH5LQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB7022 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Parav Pandit Flow steering core layer is independent of the eswitch layer. Hence avoid fs_core dependency on eswitch. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 10 ---------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 10 ++++++++++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h index 67e09902bd88b..522cadc09149a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h @@ -44,16 +44,6 @@ #include "lib/mpfs.h" #include "en/tc_ct.h" -#define FDB_TC_MAX_CHAIN 3 -#define FDB_FT_CHAIN (FDB_TC_MAX_CHAIN + 1) -#define FDB_TC_SLOW_PATH_CHAIN (FDB_FT_CHAIN + 1) - -/* The index of the last real chain (FT) + 1 as chain zero is valid as well */ -#define FDB_NUM_CHAINS (FDB_FT_CHAIN + 1) - -#define FDB_TC_MAX_PRIO 16 -#define FDB_TC_LEVELS_PER_PRIO 2 - #ifdef CONFIG_MLX5_ESWITCH #define ESW_OFFLOADS_DEFAULT_NUM_GROUPS 15 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index 13e2fb79c21ae..e47a669839356 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -41,7 +41,6 @@ #include "diag/fs_tracepoint.h" #include "accel/ipsec.h" #include "fpga/ipsec.h" -#include "eswitch.h" #define INIT_TREE_NODE_ARRAY_SIZE(...) (sizeof((struct init_tree_node[]){__VA_ARGS__}) /\ sizeof(struct init_tree_node)) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h index 825b662f809b4..afe7f0bffb939 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h @@ -39,6 +39,16 @@ #include #include +#define FDB_TC_MAX_CHAIN 3 +#define FDB_FT_CHAIN (FDB_TC_MAX_CHAIN + 1) +#define FDB_TC_SLOW_PATH_CHAIN (FDB_FT_CHAIN + 1) + +/* The index of the last real chain (FT) + 1 as chain zero is valid as well */ +#define FDB_NUM_CHAINS (FDB_FT_CHAIN + 1) + +#define FDB_TC_MAX_PRIO 16 +#define FDB_TC_LEVELS_PER_PRIO 2 + struct mlx5_modify_hdr { enum mlx5_flow_namespace_type ns_type; union { From patchwork Wed Jun 24 02:18:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 217225 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=-10.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 87D84C433E0 for ; Wed, 24 Jun 2020 02:21:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F2B820DD4 for ; Wed, 24 Jun 2020 02:21:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="qbI2gk4v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388231AbgFXCVV (ORCPT ); Tue, 23 Jun 2020 22:21:21 -0400 Received: from mail-eopbgr60051.outbound.protection.outlook.com ([40.107.6.51]:63460 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387898AbgFXCVU (ORCPT ); Tue, 23 Jun 2020 22:21:20 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O41PaLSOW37ci1V9cYWoJrjuou7HeM0Ou3LYTMABrKheMQ/6/1XOFG4vNIG4lgV2M9VqY3R64uabif5T0CjxpxAh0KyWfYI4g9nbzCzI4BO8k/zAallhBQVvkWSDwbYBM12/bBHwHnUs0lNoK0idf182C9Oqoe2WAWLiW9GM0iCPROwUsztphZglRSjJu5eALFzT6JZL1QpkB+2mrqnU8354S6r9hdUi+/YYT4D+6b/mqbSn4ufB/RelpgArjnqSqGGWY/THE+KoM3Le+agIxJe3i91OMREdgui5Ebc58cr5T9iVNQ5ETYyrmU1rNth7ldSLGM3kE3YXbGKrE9VIpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Znk5QwGW175BvUBP0Wht/sVVWuqnGkW98nuAdNdjMtU=; b=M+7AiTwLgnpo3JT8UPgzUlTe+DigZ7/KJ1VTnkLMFMefZRyEdEZUMmD44GWyIPt4D2nPyUIRZtvK/WOK1dOq02SDtFmWQGb5CQqV5G1Axo+jnimUAgUArN8I9SMtjO2g4F15SCRK/Tt+ekvsv6F0gj9mtTsu/HD7k+XWuPsgxdO86AQQReCfGcyQLIzg5ufWsnF61nbb/uGfuuJIcK642hzdDIK/dDKBNsAdDP3QUviKnfljdqHu+V6yRqS+W9ksarad970bNgYVSm90UxXnHKO2RmcLmB/rprkJO4sCU8m1Tn4EEP1uB7cifZMIz7oWke7gytSQcanyrodH7m2yVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Znk5QwGW175BvUBP0Wht/sVVWuqnGkW98nuAdNdjMtU=; b=qbI2gk4v1VreXlSeLo+XDbfTY+9Y6oTKLfbB9jszRxnOSFzPhWa57/m2bwgwLqIW+1vGIMIPkP3DHXWXZtih5fOx6nDpmYKHR+X+UjEslf9aPXTUd0ojgLnBgGAw1ifYo1AOOXMloFUjFJqgx6elbYdDdOlCuLEcoiD6IuDnFAQ= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none; davemloft.net; dmarc=none action=none header.from=mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB7022.eurprd05.prod.outlook.com (2603:10a6:800:184::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 02:21:13 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c%2]) with mapi id 15.20.3131.020; Wed, 24 Jun 2020 02:21:13 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Hu Haowen , Leon Romanovsky , Saeed Mahameed Subject: [net-next V2 03/10] net/mlx5: Add a missing macro undefinition Date: Tue, 23 Jun 2020 19:18:18 -0700 Message-Id: <20200624021825.53707-4-saeedm@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200624021825.53707-1-saeedm@mellanox.com> References: <20200624021825.53707-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 02:21:11 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f732237f-8b73-4d83-dcd4-08d817e54439 X-MS-TrafficTypeDiagnostic: VI1PR05MB7022: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-Forefront-PRVS: 0444EB1997 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1TGwNs0PVGWYuOKbHMElBpv5g3VEqonrjiJlzNgAG/2g2UsziQZz4zprlzNvxe60FW+4DEraprEYzndK8je5qqRKOLqpVtgYI7oRUD/d+3JUEq+pPDh3VvG9znJsWUfmOinj+q5eHbYX0sGEMZ4G1RpNtgqz+Q55fhvYlpB6Ur815ZOLX1nqIdbWuPp7bIW98e+Zgnz7Qu9kB2YlaSH+Opnek8UESxzYeFJUis1XOkTQATaINYd5yOzO7SQ0cijq9qYx9PXNYcel7E8gy70hNPsuslC7hNY2IuwfWtIecQDrg/0GEMZY0GD4Jo5ogPo4LOItU3CcHohFI0mYUtUxaxHbxnn53qj+t62yzU24dvDKeztq1GDYdsumvCLUNwsl X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB5102.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(8936002)(4744005)(316002)(478600001)(107886003)(2906002)(2616005)(16526019)(956004)(186003)(1076003)(26005)(4326008)(8676002)(5660300002)(6486002)(66556008)(66476007)(6512007)(66946007)(52116002)(6506007)(86362001)(36756003)(54906003)(54420400002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: G5TQ+YHJzPGHDsb5OyGa78jCG3fu+IZGtCeGnLc6aUSc1WfFx0SsApEyLSqM7fQ8IULeaaAuq8ZQ+8Wf+Qx7FtLUsgonzz/5iHnp4A0YsXB+G8ELN6dmeT3ur84ldv9TfF0zaqCCT55OgxYtEMHPxJcwiywlhZXsQedVZ27FJZ3+L/LNCYbdD3FYaKV7t/+Y/S1ssJdEOnsKR5760+RC6IymCJDnfBLJ9fyt0kwZcMQ5/VpHDp575FSbSxk7XcZz26mqcacbp7NwSXGS8yLbcCRSVArcEBLyiK+snuP2FlaVKsOJRbuo3Ojb/e1zO5oAew+U2N9Qxg0ExNzn4b1um8IMhCWBZmFtC0UPpIMge8i3SS3knuv37mx4z/2ddJ4qjXlPQiPNxwRKBkH5dot3B7ewMxR05ON2lzn9eNAHQyjDPoIBNCg5gWX8qY5TT5N5NIXnOJhbmxj+ZoGkik23HAG7i9rDeTQBoEjr7cRqVBg= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f732237f-8b73-4d83-dcd4-08d817e54439 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 02:21:13.6035 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tLCRvhgcTOGmZO06kFKI7cqXyoLYlvbwUcYtGfjwxp5Sw9lm2FXC/wKSiHFFHhD/C/b4U9wqCrzOBFX/HdjOpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB7022 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Hu Haowen The macro ODP_CAP_SET_MAX is only used in function handle_hca_cap_odp() in file main.c, so it should be undefined when there are no more uses of it. Signed-off-by: Hu Haowen Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 8b658908f0442..be038ed1658b8 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -489,6 +489,8 @@ static int handle_hca_cap_odp(struct mlx5_core_dev *dev, void *set_ctx) ODP_CAP_SET_MAX(dev, dc_odp_caps.read); ODP_CAP_SET_MAX(dev, dc_odp_caps.atomic); +#undef ODP_CAP_SET_MAX + if (!do_set) return 0; From patchwork Wed Jun 24 02:18:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 217224 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=-10.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 7B4B0C433E0 for ; Wed, 24 Jun 2020 02:21:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5755B20DD4 for ; Wed, 24 Jun 2020 02:21:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="hMAz2Tjm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388294AbgFXCV3 (ORCPT ); Tue, 23 Jun 2020 22:21:29 -0400 Received: from mail-eopbgr60051.outbound.protection.outlook.com ([40.107.6.51]:63460 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388095AbgFXCV1 (ORCPT ); Tue, 23 Jun 2020 22:21:27 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TwAI2x7bOCWWrmxMRpic8/s9Vp/Ohoo88s4QxsHDbUEuw9DuMqMye5G+SATMnIugSZ9xsL+BHS/IHzhywwmZ+RXLkELtuNLd/Nafu/ob1FewYzfuGELpBXPvV16JYyxpK307RH0OVNdb5ip1XiBYwW8Zu/ReE4YZpQvjnxp7mp/l3i3LHO6b+/SyHWDlu8rru9bV8dhFDGGDNLd43WFVGgc9mPlw9T35RstWA47i8NpI8Ff5kIW/YJ74hQi7ws8ZfoaZV3q2olsN+5+BCceNWp9Kl7bkvvm+jBVw67xAnt3Uts77/ovnr5tDmraVT+J2ofGeQCj7pFUPTKEGRBIFdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MvlrTmQHnXAEK9ooKha8cL1GrEdP0cdhD8iDygZfaQ0=; b=kDkHX7/y1jE6ybm8+UOPM4A6y/XDiyh3cLIYCr6JC3/XiaRFSNy9WwovD7iQQDCSrW5gQJ6PrFfQZmu8ZRL/wDG/EF00ziv2Zm2VGmteC3HeiIveTiSD5/hCszz5Ml+R3ELGnDad1Z36t0avlSlqz6nVleuLcXyGCGoikP/SKkOoJnmoG+PcyDRPn4GpzENIDm/0JPPZ0eJP20h6VI7r89fbZ5lASsLNx1GGD9fijLVhASKZ70o8TBXS33Ej8wYVzV3wLQer8STG1zzQDzZ1FWzM0kpc5uQPZtR4KrRmqk0QBIczmgoThcasf1CM0orBMBXL8Jkfi7kLyLFzo6QoPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MvlrTmQHnXAEK9ooKha8cL1GrEdP0cdhD8iDygZfaQ0=; b=hMAz2TjmwQNNWAZGQ34F59P0ZVHXs6ub67+iGvghEyKTpCVWiuSxH7Od1syTD+UqHzzQNQOJBBTr7N6j2H8spkGB3k6+X62M38YjxCoPeprwJabW1sTBcKwBbtLC051c4BufMeIKjKPVnlt1nhBrHPFpMXH75P24vXqP9LgePxU= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none; davemloft.net; dmarc=none action=none header.from=mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB7022.eurprd05.prod.outlook.com (2603:10a6:800:184::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 02:21:17 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c%2]) with mapi id 15.20.3131.020; Wed, 24 Jun 2020 02:21:17 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Maxim Mikityanskiy , Saeed Mahameed Subject: [net-next V2 05/10] net/mlx5e: Remove unused mlx5e_xsk_first_unused_channel Date: Tue, 23 Jun 2020 19:18:20 -0700 Message-Id: <20200624021825.53707-6-saeedm@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200624021825.53707-1-saeedm@mellanox.com> References: <20200624021825.53707-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 02:21:16 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f9741a04-0b11-454e-5ed6-08d817e546a8 X-MS-TrafficTypeDiagnostic: VI1PR05MB7022: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:162; X-Forefront-PRVS: 0444EB1997 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fq2rQh6z3VwbnfTTBsWiZMktPCmtwKEhWSwrpLOPkQR0rFiV+iHJGJY69323jeqzP1H/ZKStJh3gIbt4243C/z26uKo9W1DI7MSb1xasLnoH0wdRJKFGx2qRmHeL/9jb0ddRc/YaunA7Yt4ATpXdSoSlb/Foqn8oybKwGxCodXjo8Dzxdlw3YUek7CStFk1sx6Tcc6My6zEzHjUCIYnYr45y1xrmsvaH8nOpgyvslsWaiitz5ZZa6X0odNp3MXRNaQ2nrvV0NTJe9oJoFiZaBV9ysZX/5X9/EuFDT20NpyygY5wCBSGA8LNBU08EZpIOjmu19pcySgMKV4ca3i0B5zOvnkxIjPoMmEpGODNOzVdKatXthe0jSggB50/OhYcw X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB5102.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(8936002)(316002)(478600001)(107886003)(2906002)(2616005)(16526019)(956004)(6666004)(186003)(1076003)(26005)(4326008)(8676002)(5660300002)(6486002)(66556008)(66476007)(83380400001)(6512007)(66946007)(52116002)(6506007)(86362001)(36756003)(54906003)(54420400002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: jwjjUvwrtedTCtenSwvoG9NmjfZ6Gso9/ubbveqeQzBnrKmg94KTSNvgnxF3kdP922Y8mdQ6jUz2h/562n0MYMiZUiSU0IptEKHLdc9CZd/1eG6D7DdefZo0PpvpgI4XktP/mOhFJb7gJVHkCNLGfs7QNKPeIcwO4iVKEEpNzNC7gvhhW1QmsUlaVIvlQ6C10qaCJMVmEf87P49NPWdMwmJRhxLcwQmWQkZ5n0/djwttF8lWM1Uv+P8m2fsyKDYJpHZ3Do/1XIGlnRXEqFXntKuOi5YA4zA4KNyomZNwBOL2oTC24jGkUBfKMDhvxYiOl8wumr2qeF1IeCW/pReSS0SYX5QHm7qn3knwd7/v7bQ9SP12CoYk373BzIWX60SUdsk59ceHL7hsXFEmVOnbf5Vmlg5W1bJf+Esk3roLlVGOz5FAUmDdX1Od6IlFIU0StzUtZ/2ALv1bEqnqnNKKJE+IuHuxNMltqIX2m5CaxbU= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9741a04-0b11-454e-5ed6-08d817e546a8 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 02:21:17.5213 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DE4wce2YL9yCdXf8NRdvR139EV523qv59/60cgcFA/qx6j45JBrLzZOUFaxDQ2nnpApFnH2WlY8nec/kl2EhKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB7022 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Maxim Mikityanskiy mlx5e_xsk_first_unused_channel is a leftover from old versions of the first XSK commit, and it was never used. Remove it. Fixes: db05815b36cb ("net/mlx5e: Add XSK zero-copy support") Signed-off-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en/xsk/umem.c | 13 ------------- .../net/ethernet/mellanox/mlx5/core/en/xsk/umem.h | 2 -- 2 files changed, 15 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/umem.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/umem.c index 7b17fcd0a56d7..331ca2b0f8a4a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/umem.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/umem.c @@ -215,16 +215,3 @@ int mlx5e_xsk_setup_umem(struct net_device *dev, struct xdp_umem *umem, u16 qid) return umem ? mlx5e_xsk_enable_umem(priv, umem, ix) : mlx5e_xsk_disable_umem(priv, ix); } - -u16 mlx5e_xsk_first_unused_channel(struct mlx5e_params *params, struct mlx5e_xsk *xsk) -{ - u16 res = xsk->refcnt ? params->num_channels : 0; - - while (res) { - if (mlx5e_xsk_get_umem(params, xsk, res - 1)) - break; - --res; - } - - return res; -} diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/umem.h b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/umem.h index 25b4cbe58b540..bada949735867 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/umem.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/umem.h @@ -26,6 +26,4 @@ int mlx5e_xsk_setup_umem(struct net_device *dev, struct xdp_umem *umem, u16 qid) int mlx5e_xsk_resize_reuseq(struct xdp_umem *umem, u32 nentries); -u16 mlx5e_xsk_first_unused_channel(struct mlx5e_params *params, struct mlx5e_xsk *xsk); - #endif /* __MLX5_EN_XSK_UMEM_H__ */ From patchwork Wed Jun 24 02:18:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 217223 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=-10.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 3A371C433E0 for ; Wed, 24 Jun 2020 02:21:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E83720CC7 for ; Wed, 24 Jun 2020 02:21:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="MmM6xMFt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388342AbgFXCVg (ORCPT ); Tue, 23 Jun 2020 22:21:36 -0400 Received: from mail-eopbgr60051.outbound.protection.outlook.com ([40.107.6.51]:63460 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388095AbgFXCVe (ORCPT ); Tue, 23 Jun 2020 22:21:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ekf6uUkJ/R4IJNGi/QTkv71Gm8IfXEpWyKP5QDov/EBMCeSjE6BcNJixAWbsR2mi1bgYBIx4Z27TpFaMb7zIr7lubZwZ8sujpGXwXX4PcUFluuFNcGps8W3aS+pJDNOIXOP2JvMORtnULnfX2iAXecWQ82hTC+7je5p1Ikg8n9nQH6vAhJG9Fy6yaqNos9J5nm3L48vFr5eYqHXHUQNELXa6kFZdODm3yJsusDRHcQC2B1mgAnnUmdtcTlcCc80c6jnvMoTnHolDA4TuZCzAt714F8skyI5izLSf682QQgSjsHuN1xzOyNThqMcnUXsvQdGen6jQ1NX/MogmvmUZcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z1ulmEsLk87aPuwLqOA4+/0tBo0bloH/+X64+wQ9dqk=; b=Wz5FqsBaByGyIjXbUaEh5v6mhqGqM21TM+53bkLomfONLwnnWJArFR9XOUYICD7SesZw5BywrmXX263O5zf8hrUxsQI3yixWbCTqQLlvw6l2tA1ljaBy4ms93ASYgLDJMcWGjHM2gEKPbQDmGlMDkcTIfBIIh/2VgtlY4UCw+N9VkEckk7Rq9jO+gVUgSj18E29Umt5FwG3xb29N9r1G8XtZlThsWuFDsXkZrc9qz074uO4MvwnccQQ7w9sGfqixmLVBpWLO6uPABmp/j0XgadFjupNg8qutLrmaynlx6c/443Jx/Mc9KW2SXOmvu9ic6fraDDae1q7ETm7NHdnmWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z1ulmEsLk87aPuwLqOA4+/0tBo0bloH/+X64+wQ9dqk=; b=MmM6xMFtouFYpU89WIQ2okvgMu1ZnoOVcfs6PaBOPGKc3aJQII4XowtzIIuUNEs++XBJNEOOiWy+Kk/w4gGN4N6B11+m+tCtMbsLX2dPCeBOdUWh178o7HzWrz0KZdNzKybeJR5PZZsWZq9vB2jlLlQn1a21B204P+G8j10NBSE= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none; davemloft.net; dmarc=none action=none header.from=mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB7022.eurprd05.prod.outlook.com (2603:10a6:800:184::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 02:21:21 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c%2]) with mapi id 15.20.3131.020; Wed, 24 Jun 2020 02:21:21 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Vlad Buslov , Roi Dayan , Maor Dickman , Saeed Mahameed Subject: [net-next V2 07/10] net/mlx5e: Move TC-specific function definitions into MLX5_CLS_ACT Date: Tue, 23 Jun 2020 19:18:22 -0700 Message-Id: <20200624021825.53707-8-saeedm@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200624021825.53707-1-saeedm@mellanox.com> References: <20200624021825.53707-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 02:21:19 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9c495c9f-7d42-43d5-abc1-08d817e54925 X-MS-TrafficTypeDiagnostic: VI1PR05MB7022: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:257; X-Forefront-PRVS: 0444EB1997 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /1nqucVSfEgxoEx2mCM1PiAF0VuIzTAnZ7IuXEthupyz2B9A0CpoyumOJhdaZ5BNBkAsU1r+CmOMqdBkhGj4T0AleCRENihgPSVTfu5jClMu9gitsFjQg3l0fBokg9elbDb2Y5h0tPPhKdnCv0dA5CnXuurrWeRydsMScJZm9v28wgY6sTM+9DWNlGPz9UwZjze2JlQ/vP7QfKAdnV8QF187jd/n2GGpyL2/H/ccAT+2Zf8cyZifHAlEWSr7sLfOim2vkFo73qB0bioiR64q2yWNnt197c+qI00/4mxotPm4aIiTRMq4/6oVTDFHvGsgFnXHH0QMGo7bdi2E5NvZy0NyxHx1vjemFpbSCdN0F/sj5tMYxxbgC+yXdzNrZlJ3 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB5102.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(8936002)(316002)(478600001)(107886003)(2906002)(2616005)(16526019)(956004)(6666004)(186003)(1076003)(26005)(4326008)(8676002)(5660300002)(6486002)(66556008)(66476007)(83380400001)(6512007)(66946007)(52116002)(6506007)(86362001)(36756003)(54906003)(54420400002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: YUQY0rYz9eT9ebKJ6eVRB4fVoxQ/uf+GwslKqdrelhfkz0ewJ+PEgLqHJ20sZlaiKR7ykkqPCryvYbl60i0C0L1ht4l2pWE5cT9dqu9LrckKZgEgSwkXfDHUXu1ESEORy7TeBaWE4B1JI2b5A0yd49++1oIxrS+wZ+6dKmllup+dnpmfu1Zw4rC/kxOyrJnewo2esIkX0F6BJI1rj3Vta59zpQgBK/TvUv2B/ro8SjyaT7sOYFKzmS4xtA59QQhU8W0kMZDnjbRJ274/foOcnw5S/gkeHC5Ls+9cX6SawM/yTDAmHfnj9QpEXZ+SxSMIJ5ztsJWclVdQD/N6Ax4sNwd8hW/YuXnM125JylpZ9FxyWg7D/jZAcfOc9sEWgMCHl6/HZ0vPmLBvp4HXWzP5Wb12iTOMz7O4PKrqyATUXHcYwtFRV0y1HtZdOe5tGp3AKLW8shFE5gPxjAzcOtGjQXsExaV9Ago+ChOqHr/HkbA= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c495c9f-7d42-43d5-abc1-08d817e54925 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 02:21:21.7119 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /qypaGW4AWd04qxtKI9qXttsMsS9uzwaIOQhyWq+TV9uOrYf4RGCLVsO8xTUYMsGxiCR7VsfqRa8FHwn/Tzssg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB7022 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vlad Buslov en_tc.h header file declares several TC-specific functions in CONFIG_MLX5_ESWITCH block even though those functions are only compiled when CONFIG_MLX5_CLS_ACT is set, which is a recent change. Move them to proper block. Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.h b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.h index 5c330b0cae213..1561eaa89ffd2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.h @@ -40,6 +40,14 @@ #ifdef CONFIG_MLX5_ESWITCH +int mlx5e_tc_num_filters(struct mlx5e_priv *priv, unsigned long flags); + +struct mlx5e_tc_update_priv { + struct net_device *tun_dev; +}; + +#if IS_ENABLED(CONFIG_MLX5_CLS_ACT) + struct tunnel_match_key { struct flow_dissector_key_control enc_control; struct flow_dissector_key_keyid enc_key_id; @@ -114,8 +122,6 @@ void mlx5e_put_encap_flow_list(struct mlx5e_priv *priv, struct list_head *flow_l struct mlx5e_neigh_hash_entry; void mlx5e_tc_update_neigh_used_value(struct mlx5e_neigh_hash_entry *nhe); -int mlx5e_tc_num_filters(struct mlx5e_priv *priv, unsigned long flags); - void mlx5e_tc_reoffload_flows_work(struct work_struct *work); enum mlx5e_tc_attr_to_reg { @@ -142,10 +148,6 @@ extern struct mlx5e_tc_attr_to_reg_mapping mlx5e_tc_attr_to_reg_mappings[]; bool mlx5e_is_valid_eswitch_fwd_dev(struct mlx5e_priv *priv, struct net_device *out_dev); -struct mlx5e_tc_update_priv { - struct net_device *tun_dev; -}; - struct mlx5e_tc_mod_hdr_acts { int num_actions; int max_actions; @@ -174,8 +176,6 @@ void mlx5e_tc_set_ethertype(struct mlx5_core_dev *mdev, struct flow_match_basic *match, bool outer, void *headers_c, void *headers_v); -#if IS_ENABLED(CONFIG_MLX5_CLS_ACT) - int mlx5e_tc_nic_init(struct mlx5e_priv *priv); void mlx5e_tc_nic_cleanup(struct mlx5e_priv *priv); From patchwork Wed Jun 24 02:18:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 217222 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=-10.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 EB9A5C433DF for ; Wed, 24 Jun 2020 02:21:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C3FDD20836 for ; Wed, 24 Jun 2020 02:21:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="IRKflEJh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388421AbgFXCVo (ORCPT ); Tue, 23 Jun 2020 22:21:44 -0400 Received: from mail-eopbgr60051.outbound.protection.outlook.com ([40.107.6.51]:63460 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388095AbgFXCVi (ORCPT ); Tue, 23 Jun 2020 22:21:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ioCbazGBLtN4VdW0n64IRglaDkrWeHShLW+wKeVUWvHNn3NdpuSzbUDTJXY8odLGEOBtPpHFcatKHtmcVhvWwIwMaOakf8gWUkNaiIrI0mld8boMZ5yAhgCxEqAy/w8uqXalaRkOnI37OZTQP30B6PTuB0gwMMFJyfcewMUW0KJ8yrVDi39T3hphGr/A2j5D2gGALAz1a7NwQe4CLQ1gLxEoDvXnRomFhdN1zjK2Ue6yKMcaRvYeWTzUDvAA15+bxMhWUdFGUbQX8D/FgFItGVwpQXvl2r+4JDZyPtTAdEJMibp7Iqg7TOjyvJmehF/2NZf8i3sePjtOlQtMKZfFJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xO3DnVWv1QEqusc+nGUHwMvFvdcoYJPgoujYQZhZ7O8=; b=LXnrvWxKm6j9RNY+h+sS90wLGZApR9/GA/sJ0n5Jt3lERAk29dk4OcY3s6V+jGK0ZWzEHNeHQKWgWe2LGTJWdgs5B2zXVFI3Z/mWlXKGk3wF4nKymgyJz/dLj7l/gdlAOuTbaHa4j7R+tY6/dYkeWf2gtlShafhMyaOVA3jRLJJ5M/ueOkdA8GJZJ4tNIfU6qMZ4rpvcil7aB7a1+Md/y2pcm2c8G2PqOML8Kvs8bze4KyCeVv4IIKGysAGlabNuTWLqmJWajlrvr6qOiLnYvx6dDuzN++YD5aO+nIexo5HqTYQkHnae4YqLOF+Obutv7ImyfOpJWQ/6cCOch6kZKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xO3DnVWv1QEqusc+nGUHwMvFvdcoYJPgoujYQZhZ7O8=; b=IRKflEJhlBjxHdkD9JxTTOHaD7yg5S0IuLASCCcod4HeQp+pcd4q7tEwNmjTEHKcafgcf4f/FKcXHe/5UQaAgbqD0+SO5pqUH2u5g1C1v74YJUlFgAO2EkVQQKCWjIVdIv1QImxIei4xZXQBUTAmBML1V3oK1iC8NS0urXYDIjY= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none; davemloft.net; dmarc=none action=none header.from=mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB7022.eurprd05.prod.outlook.com (2603:10a6:800:184::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 02:21:25 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::2405:4594:97a:13c%2]) with mapi id 15.20.3131.020; Wed, 24 Jun 2020 02:21:25 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Saeed Mahameed Subject: [net-next V2 09/10] net/mlx5e: vxlan: Return bool instead of opaque ptr in port_lookup() Date: Tue, 23 Jun 2020 19:18:24 -0700 Message-Id: <20200624021825.53707-10-saeedm@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200624021825.53707-1-saeedm@mellanox.com> References: <20200624021825.53707-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BYAPR07CA0077.namprd07.prod.outlook.com (2603:10b6:a03:12b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 24 Jun 2020 02:21:23 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fce04842-b70b-4ee5-d5f2-08d817e54b26 X-MS-TrafficTypeDiagnostic: VI1PR05MB7022: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0444EB1997 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 97APZxPWIXtvNOaR3SqDu6eRabZ626MZBIhToVv0ub0zjHlyYAoBAd45/wAQbwBaDz5Vg2Ij2zYJ3Uj1Le3ZU+cJdVrpi2uGZ1yTSTUnHYeIE2sQ3/kC76q0iUXjWoSviMGhSSuDDhfkKYKYHDSFKidra6hCyrd9hWbzz4nr+izIBZigN6nPcRqQaCYXBnzZSS5YmYaMT8hg1hB12HzVaqjtjdtCf3k76sVRZlX287MD2NFn5He7EoQIKGNiCbWi7c43Qw7EqM82cAdgq2OOYcOdv3puhtv4JiP5pfjSmvRQ3bvvK7OuDdFgY+Xvfem0lEBSDIAnU97i0pqF8ifOzhD7XZdGwkehkwEv0yKI4pufiOFJbAYCTAtjCg+GV4HSPkgTfMP4Y7OB2l7c/IRP0DgdIYpsJi2edwJjA2dQrmE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR05MB5102.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(8936002)(316002)(478600001)(107886003)(2906002)(2616005)(16526019)(956004)(186003)(1076003)(26005)(4326008)(8676002)(5660300002)(6486002)(66556008)(66476007)(83380400001)(6512007)(66946007)(52116002)(6506007)(86362001)(36756003)(43170500006)(54420400002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Z9GgyEL81ELRvi6cgysvURpJFmaXEldqngAsQRpVt6KNCfNKquhv/iSA+lLkHA7HokoO2S+7KC+gZeV00oNwkrW+I20c+VFPKTxhgf6Dm9IkI0GJDjIroesl7oBCv6uBTLZFbyc6+7rXJ2BB7kEQeadXGFSMZHsi3olimEREE2QWEQTibtGGWBSCqfBxY3+/O+xJFOAkKWLnyK0iLcFljWtlg7G6RUUK1WpE0fvmXS2Yo5SNyhvj9esrn0cOuYAKlK/xosF8ze0xlO/C6VLTRMkgmfvql3Q3+7CIIQOXbpa/7hS+w2tNB+zDdPl8ONmi7/utc0KFFZmk+xvLfEu5qrVgwcOHgtp/glVdGODWSbD0Qq8TlOekCA2QGImgateCXT2uI3m7lr5lvgQk11E/6hjOdaGMqRTj9yKC6ASETpKKXoGibh01H5py4iCdIy0LfQW6lktY3yIH8Y22aNT/c6/bVIb5Z9XNPoeZjb0GmZI= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: fce04842-b70b-4ee5-d5f2-08d817e54b26 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 02:21:25.0959 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4FCUS6x2+kXLP78Z1ADsDf2+loIdKK+xvallD7L4VlI8OLk9IqKcJyw/uTjhPZubP0hWOeU+vWs/toyKbPftyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB7022 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org struct mlx5_vxlan_port is not exposed to the outside callers, it is redundant to return a pointer to it from mlx5_vxlan_port_lookup(), to be only used as a boolean, so just return a boolean. Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c | 9 +++++---- drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h | 5 ++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c index 85cbc42955859..be34330d89cc4 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c @@ -77,9 +77,10 @@ static int mlx5_vxlan_core_del_port_cmd(struct mlx5_core_dev *mdev, u16 port) return mlx5_cmd_exec_in(mdev, delete_vxlan_udp_dport, in); } -struct mlx5_vxlan_port *mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) +bool mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) { - struct mlx5_vxlan_port *retptr = NULL, *vxlanp; + struct mlx5_vxlan_port *vxlanp; + bool found = false; if (!mlx5_vxlan_allowed(vxlan)) return NULL; @@ -87,12 +88,12 @@ struct mlx5_vxlan_port *mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 por rcu_read_lock(); hash_for_each_possible_rcu(vxlan->htable, vxlanp, hlist, port) if (vxlanp->udp_port == port) { - retptr = vxlanp; + found = true; break; } rcu_read_unlock(); - return retptr; + return found; } static struct mlx5_vxlan_port *vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h b/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h index 8fb0eb08fa6d2..6d599f4a8acdf 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h @@ -50,15 +50,14 @@ struct mlx5_vxlan *mlx5_vxlan_create(struct mlx5_core_dev *mdev); void mlx5_vxlan_destroy(struct mlx5_vxlan *vxlan); int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port); int mlx5_vxlan_del_port(struct mlx5_vxlan *vxlan, u16 port); -struct mlx5_vxlan_port *mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port); +bool mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port); #else static inline struct mlx5_vxlan* mlx5_vxlan_create(struct mlx5_core_dev *mdev) { return ERR_PTR(-EOPNOTSUPP); } static inline void mlx5_vxlan_destroy(struct mlx5_vxlan *vxlan) { return; } static inline int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port) { return -EOPNOTSUPP; } static inline int mlx5_vxlan_del_port(struct mlx5_vxlan *vxlan, u16 port) { return -EOPNOTSUPP; } -static inline struct mx5_vxlan_port* -mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) { return NULL; } +static inline bool mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) { return false; } #endif #endif /* __MLX5_VXLAN_H__ */