From patchwork Wed Jun 24 04:46:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 217217 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 C651BC433E0 for ; Wed, 24 Jun 2020 04:47:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0B932085B for ; Wed, 24 Jun 2020 04:47:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="CUQEWUJG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388766AbgFXErc (ORCPT ); Wed, 24 Jun 2020 00:47:32 -0400 Received: from mail-eopbgr150040.outbound.protection.outlook.com ([40.107.15.40]:19185 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388036AbgFXEra (ORCPT ); Wed, 24 Jun 2020 00:47:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TwAXUDBnQSas2FdHtjiZ7wX6U7yih+NN+1PeENuNyyHbn39z4AZqjOdD4ZjU7b/41nGAZUJT7CstTIRsW/Os+6PuFjurn1zGyKmhSjs5mJBZ4wZulove1skdkI96Gj0hcTtl+3ROMtjjeK1QBP03c6DE5u3AzF7EzPoyrabg48ktY0UJqkmVVu0Z4i1qvufXhFwzrn7+IMTark71PQXoHLH2Fm8Je7FUDL4PSs+DllqT3KMav/rddo7Ild2CWkWBgy6nELiqQ0VmILFAgcCgSc0/wwLFTe4eSff/j+NEqf/zKnc0O74NM5z9aesvU1+GY6KlcbvT/2Vx5/vHVjTmHg== 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=571NT07tMexOGWUDw9lkMSfLxuBGVsPtYDngHakIEl0=; b=eOJH0cvgWAqaKbuMomVxrak0EJSBdLa7NTJq/FLU5ouciMYYVOcw7ioSe89DmV4owAb+gIHFn+4m2WInytJTWlLIqgQGlhRVzReX2KBZ9+FmTSDwAu3anxxUt0nuQU7Zva8M6dabLgIO/pc1ZfCLmIVQplkwQHchodA4dTNmXorWqw0b0nb09xptfcPCd/ak+pbffD3dNlJB5cBzor3r3g0+2QpiFMQdAly0xqp7igOPuPCJyMKiKgh6H8HE73UoG/raZpz/TEPfq/r4lXAERyKDjODhtYvY6+f0QO8UrQdBUGolykMtfSuV4Rl55u9SJA2VZ+RgZm6rUIWfRHa+Hw== 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=571NT07tMexOGWUDw9lkMSfLxuBGVsPtYDngHakIEl0=; b=CUQEWUJGTdOfiATHXy66Unihll3yXX3peG/T3pkjyHW92ButrEoZiT+6Vs/9KoisunQdrTOEV1MBN3Kbwn6oWng9jsso1KtIHcnL/aJG4Vb8HHJv1cOsTjGcU7ZXBiHsmCol4BXvEFvUcdrqJ6Y9vlGLIFJF/U2zUhGhJ5MpIIA= 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 VI1PR05MB5135.eurprd05.prod.outlook.com (2603:10a6:803:af::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Wed, 24 Jun 2020 04:47: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 04:47:20 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Hu Haowen , Saeed Mahameed Subject: [net-next V3 2/9] net/mlx5: FWTrace: Add missing space Date: Tue, 23 Jun 2020 21:46:08 -0700 Message-Id: <20200624044615.64553-3-saeedm@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200624044615.64553-1-saeedm@mellanox.com> References: <20200624044615.64553-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR02CA0051.namprd02.prod.outlook.com (2603:10b6:a03:54::28) 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 (216.228.112.22) by BYAPR02CA0051.namprd02.prod.outlook.com (2603:10b6:a03:54::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Wed, 24 Jun 2020 04:47:19 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [216.228.112.22] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: deba3c29-8d0b-4535-678b-08d817f9ade6 X-MS-TrafficTypeDiagnostic: VI1PR05MB5135: 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: FthnLwKwrHL1Q2RyrROzQhAkDRN6xV0LCYRJJ+qDuhkVNOTfwv4VX3FJS5LwR9yxzEcm3VEHhNZukVHBLIqrDoR+8Y+e953Ph18aohtV4aWIWdnJ3YtTwYzcYK8XOoIo7YOEoWEfIpacSwtMjHXZLlG2RPknGQ8lDGbHz6JVy0u9r2I9i99K17/WnWDytuXD+KLpEqOyWEJsuG75tDMgwjTKQUDGWoguG0eQP05KNXfeR8InF3IP4MI5cyHbgOQo3uwhqYK758WhLDHTI6vwnke20YskrWt4xth1HuKOyMhTwnV8vk0mI0p+zBl2LG5++CxNNw6283Hn/S2raeQI70G+xAIl0u+25CkWkdR/t86x5oTUYJkeMCMoCFrR4YUa 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)(346002)(39850400004)(376002)(366004)(396003)(136003)(107886003)(52116002)(86362001)(8676002)(8936002)(478600001)(26005)(83380400001)(5660300002)(6512007)(2906002)(54906003)(4326008)(956004)(186003)(6666004)(16526019)(316002)(2616005)(6506007)(66556008)(66476007)(6486002)(1076003)(66946007)(36756003)(54420400002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: ZRsiKm4T2oPz6UXYNGZxUY9RLLwPB0jbirtoaPMYapbzjABBSPeSU8M6zhd0kWNqGfxIcMPk3unKzSLiemJ+CT5XqQpi02UxSJT2D3Wnr7LTYVWvjQzJ8nNfgaL54t/NEaHo7+FybP+LbcK8ktm65eq7Xrihe+koyEnBuXEtBVdXjEOxNMOUhwzmMyFICh/0wgzpqNz+heEZP6N8+YyrosPBu0J44maWpkpRW8zsvllknuZb83Yql0sSmXRGiOAZsYSkySzdxKHhCRddz7/K11Y8w8H7fEUL28kJMf4CAY40qBK4z6RdN0fa8E+BAILEsXM8tdv9mPVoC2BQvf74pCm8DCC9WdjnBeNp2R6ahOOytV0SuSttjlmkOhrIxJNzHkYo1NcQ6W8HeoXeoaWOLDHT3CIjpEKxQ3Ps26mepgrXVMmkqIsuzzVBlt4yNY0ZDt5KrrQBBjXshK5pBBdltVF+uqbxRYgii8ey/qjOpXSXg+ELGcoVSafuTRElSSOk X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: deba3c29-8d0b-4535-678b-08d817f9ade6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 04:47:20.9236 (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: eV3ZtliBBJCJYpLa+tTVXUeK62Ayz12gJrUY55+MvKU6+9MnwCOjQdtDB4XJD/S4CaBSnyZw1i8r0r4aoiAtXg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB5135 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Hu Haowen Missing space at the end of a comment line, add it. Signed-off-by: Hu Haowen Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c index a7551274be58a..ad3594c4afcb5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c @@ -676,7 +676,7 @@ static void mlx5_fw_tracer_handle_traces(struct work_struct *work) block_count = tracer->buff.size / TRACER_BLOCK_SIZE_BYTE; start_offset = tracer->buff.consumer_index * TRACER_BLOCK_SIZE_BYTE; - /* Copy the block to local buffer to avoid HW override while being processed*/ + /* Copy the block to local buffer to avoid HW override while being processed */ memcpy(tmp_trace_block, tracer->buff.log_buf + start_offset, TRACER_BLOCK_SIZE_BYTE); From patchwork Wed Jun 24 04:46:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 217216 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 79D83C433E0 for ; Wed, 24 Jun 2020 04:47:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5586F2084D for ; Wed, 24 Jun 2020 04:47:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="T+Ne7o5O" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388825AbgFXErj (ORCPT ); Wed, 24 Jun 2020 00:47:39 -0400 Received: from mail-eopbgr150040.outbound.protection.outlook.com ([40.107.15.40]:19185 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388036AbgFXErg (ORCPT ); Wed, 24 Jun 2020 00:47:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k7KmOmy78Vylf26QFaA7gH2S5fyyX2LWuTe54ZzHFBp1Kfd5K7WWBQyLZW285HDhXcNDcfW4lU+ZIRHV2r3LEFa4C9vmknwjYByCJBWhx/h3GeLO10xBT04XLHbZWXgs+fXC5novAdA4XPaDrnc7VKEY3Ovv5LIRVApNx94CJ+SOoOT1zafnwiCde3e/00QnnwFxKVobxkq8yNfKZwAow26tFZlVWzpP+EeH0wCTAt1NZMfvfAEnoTG+Zz14ma4sZSuXgS0sDMSMWCkTfJ95+8MJ0I8PLvFREKHNtqIS69teQeQehIjOvbfPvwzx1tz8+fAcRD+jWYCKRwds5lgWHA== 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=Udfe4QH6uH366uKmUb8ao7jI+xYahom7tUdb2q7n8dHlcBaWAvn0z9br1Pg02gXtGXrw6lcnwKE+E29KzRHgTlglo41CCUYpmqR8rA38RN0ZRN0Jqth/uCrTJFm1OpdJqMuYOXV3XFXjpykF16xdDrLdvOvMls2nRp6RzHuenQt8v8P0XnBBzBiU43BfV96XZIVH5ceT+ySUJQ56STjij0SoUvcorr2dJFl8UHRHljEJjKbPtx29kq9xj8Y3x5fhMyX0F62W5XupuPdtxUueU2YAt/g7nyXb1QkD5RG0/kFDIoseWJD9ZclVkId0BWXPACl8AH89ngu9moRl0hccpg== 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=T+Ne7o5ObGNsQLonYaD2HOhDGcJ4K8654QA/5mP90aZ3mcHiIIq+vTiL2QxLNntGlHlYGwjvhYRgApbIHuxWnZVpC2isbf/gGsARL+JFF6yflngBOboyPfy4Rz/S4PxKRJNo2ZSKa7HAPqXu7wbp0FOjZia3LNye7SSQhxSNcHA= 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 VI1PR05MB5135.eurprd05.prod.outlook.com (2603:10a6:803:af::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Wed, 24 Jun 2020 04:47:27 +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 04:47:27 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Maxim Mikityanskiy , Saeed Mahameed Subject: [net-next V3 4/9] net/mlx5e: Remove unused mlx5e_xsk_first_unused_channel Date: Tue, 23 Jun 2020 21:46:10 -0700 Message-Id: <20200624044615.64553-5-saeedm@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200624044615.64553-1-saeedm@mellanox.com> References: <20200624044615.64553-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR02CA0051.namprd02.prod.outlook.com (2603:10b6:a03:54::28) 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 (216.228.112.22) by BYAPR02CA0051.namprd02.prod.outlook.com (2603:10b6:a03:54::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Wed, 24 Jun 2020 04:47:24 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [216.228.112.22] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a1e9dceb-47ff-4553-0392-08d817f9b0cc X-MS-TrafficTypeDiagnostic: VI1PR05MB5135: 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: t4IU/b3gE6dMUiBG3jw32oumOkcOsEJyB/NRQubVoDsUr6jPa5FUdAWNPPEaRi4P3FjIab+l6kLE2L5ruo2w0RAIHqguGL2OeYAaXs6bBEEudAsgpqpJ3GxtfEkA/cH9fd89cAipl68yvYJ+raLp0WsUBNCsegOuhKVInRJD21cqCskGguROq/vsi0ZSZQVfswDNcGCU/YON7MXbBJOAIfFc0QDEnTuyUTdJvzho8B5FW1mJXe3WX7oEfEpYbFFkSI16hl8ua3Sw5F6mBSgMEViQUu1WRs73ts76rvd0eOU9EE2IZZAbKR8+HhkjEjVfGDaPJ/5t1cXqFNyG+179G8/YH6DD7pHDc0RRwbSCHAW2viN5eXI0xzPTvd4FR2qr 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)(346002)(39850400004)(376002)(366004)(396003)(136003)(107886003)(52116002)(86362001)(8676002)(8936002)(478600001)(26005)(83380400001)(5660300002)(6512007)(2906002)(54906003)(4326008)(956004)(186003)(6666004)(16526019)(316002)(2616005)(6506007)(66556008)(66476007)(6486002)(1076003)(66946007)(36756003)(54420400002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: AmgIAjCFn0Z3uwGX65WL1ASDIgQrx3lvlXlYZe9+4XUW3+ADLazFnrx2HwWLipZ/z8nSyGTkrbN2wFzZVGcIiEABvCWifLmMEtTCYLaW4zxu3uPvWsum/z7D+Sm0jV641RAjubbCj5FvabvUHFjj3ZHqkeskk1Y5rfzrutEDjYxLReu4C+jXdW5rMd8/ihUlg0kWG3/eEkf+5hS0qIdgmA6N267IO6l7Mxm/9jDtqYrL1TINz8QMQqPUp9xkN+b2u7SDijhi6mC0BQsNsvenjb0NKaxRrWC6pTsXlceYtYcGVX6LvkKzEdpfM37yHbPV8h7o0NugQ+cvuctjLUZZEX+XSvnHyPFTxvoaEym+NNGwb1+qrgj4Og94SXcLGqWrkv69hN6A7RwH1pI1XmpCQvX4XEV83VEy1+58V2ZwxOEyW+a09PJqpGu+rm7ohIsT1TuLyBNnIKVjj3jZ0Z1TCwEgulUzaUwPPv6gLR8ueu//QV3lwWXpGkl9K3ePC1z8 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1e9dceb-47ff-4553-0392-08d817f9b0cc X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 04:47:25.6449 (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: CXHDzvkxd5RwQeU+Bh4I8jnw1voYAtS3CZvLdC30ZFlNondsxbU7kyxjzgWr0RXA8p+uIhVRxdJy0x1bpTqZZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB5135 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 04:46:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 217215 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 F3310C433E0 for ; Wed, 24 Jun 2020 04:47:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD0022084D for ; Wed, 24 Jun 2020 04:47:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="rf5+sYbm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388847AbgFXErp (ORCPT ); Wed, 24 Jun 2020 00:47:45 -0400 Received: from mail-eopbgr150040.outbound.protection.outlook.com ([40.107.15.40]:19185 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388036AbgFXErm (ORCPT ); Wed, 24 Jun 2020 00:47:42 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fq6DtLoStOI+GJO1aRrcpyMEiisAoiNJTGkpEoec4RAwik2bc4GlFGFRbJEvOT3SSHsC0fjFLPTs7zo2WRHhZ9TW1BY3qwKjZiGV8A9dQs/ICPf5eP+PB6hTms+VTt5IJrnNsbnoE0w9zrp+UQEbijjNocZGkLlfJqaYrJtJraoMC7xuSn/DebiBgcEqQHDzgB3NigccBx57tLS6KjSjewO+tta2SXDky5ciHcS1Eaw9xuF660pdKJIItgxqa39KDSrhWmNtwJpDXq4ZDs5QJpbetP6I+MbMENDn4wFIF03rvX1vDZPn2CJzQPNBwWemPGkBQmvpfCxn9HbRjd6sSw== 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=AjaK2uZQPX/Z5VUPKLnCG1EwNLY8mH2mHWncO53JIEWpd0ZD7LKZVQ6W+v+F7C2xsIxl7QtY5/sgOBym89IlcC8Z7z0ZCM0C781n3+So1xRlgiTOevc3hQtLVK2c7ywCh33Tnvz81BCbY39PloiNiQGS7dL83WqzKJ9DkvjwjULqxT+r7+Gh5ML7RJOHEQ7pSxoDUC3tCpb4GPlBfHRa8NthxJfL/cYdMHbPb3R8wamFcXZiBB5V1sGDJ4Wreqwvh3D38whilBVbaFSHYgWM22Ia697DHt3SW4I6q6uF7lFu9DedAIH3Tk1brBrzFTeC139i2rd9/OlO/JJHqR34Iw== 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=rf5+sYbmXL3P19BZJPoyQ/oGdvYVNCLhqZNDx4rJswiP1x1jnFjObUvRiQXrbMUYakiVotcn6omTRvOhl2q9RtG8vQ5TtW9LwqsUf8uishRb++czaQmVOX5UUCzs7haSnYcOPpT9dJZR2CRIkhl27pnfRX00pgOMZijz8RTCI5A= 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 VI1PR05MB5135.eurprd05.prod.outlook.com (2603:10a6:803:af::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Wed, 24 Jun 2020 04:47:30 +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 04:47:30 +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 V3 6/9] net/mlx5e: Move TC-specific function definitions into MLX5_CLS_ACT Date: Tue, 23 Jun 2020 21:46:12 -0700 Message-Id: <20200624044615.64553-7-saeedm@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200624044615.64553-1-saeedm@mellanox.com> References: <20200624044615.64553-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR02CA0051.namprd02.prod.outlook.com (2603:10b6:a03:54::28) 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 (216.228.112.22) by BYAPR02CA0051.namprd02.prod.outlook.com (2603:10b6:a03:54::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Wed, 24 Jun 2020 04:47:28 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [216.228.112.22] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 34de92d5-54cb-4453-d188-08d817f9b3cf X-MS-TrafficTypeDiagnostic: VI1PR05MB5135: 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: jcdWiGTqDjxSyYQRzcNl8f0zOP0qBgncOhg1A2/zem7xM/1XuHJx0RZHKyBdHEQXnsfOB4dq5DiDxsiLKKHpgjKtIne4VTMsVESXcG/3gXesjqWuGMaeuYEwvATXTMKFXaxFvd4jjR2qkGxg7R2tHODsJobhQ56JnMd4XM/bz110ef7nmyJy0LfEraz6dSUvHqCj5guJYn2/InWoKz9goigqhAS/QL61SYGCdEuRprdl4W1z7i0Hog9yeUcVT/b6QE6UuwmYKSxZVznePKCW/1XQO1c1mybfaOSSATVrQGyr37lJk0xN8uUIu9ZoQfb3ecREjVM+dxXj6yggfu8+lD/kkQ9dJIhlq8tybAXhsZmoSwkU6Q0va/r3x7odWrY4 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)(346002)(39850400004)(376002)(366004)(396003)(136003)(107886003)(52116002)(86362001)(8676002)(8936002)(478600001)(26005)(83380400001)(5660300002)(6512007)(2906002)(54906003)(4326008)(956004)(186003)(6666004)(16526019)(316002)(2616005)(6506007)(66556008)(66476007)(6486002)(1076003)(66946007)(36756003)(54420400002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 7/pzN24sj8VeNx9aQt2k6gWECuvdFr6/myagliKLh8GOLlVDl4w6ii4bAH4Uig4lmCrOt4uteyfI7H3Xt0AYzF+aX/jVcba42P77llkPsdHMjXA6fM3FXC/Hk3PpqdNi9/dNMPEa6RCucEtV0TcpmlvDfjtMKFwgL6+4dl5fjLqzEZu8G+cfvP8cP4uKHWVTEGli/bG53APxR9qT5/JE2pk7eb6kDLIo3k4oPBhlGwZBxRj+AuNGSswEYFdr9272tSFRNKbk3iIh9dU/WMKALgiqAuqVl3jJo1Xh4GFkSeaqulKu0V//Eaz00oU4eThELHQaYfMI8mZmaeTcHQSnbgO1K/z3hyPXWNKGe4KCg/G1Ilq1TDvF4tQ3bl74S1bguI6SMy4LB/OeKxXNYc5kdUq+PMT9I7mLTcE+ZmCrcH7YLrpxaDQWjVfV5Huf26F7aCwoq0ho8SRSF0dkny8UWgfkyIZ6zQZOYB2FBHyh0gztvntYwt+y+I0E8mcHUzYA X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34de92d5-54cb-4453-d188-08d817f9b3cf X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 04:47:30.6830 (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: XSgge4QXAI6PBIhFvqmmdg6z5W1MAkpO6zXLDnSHG2/zzIEQlOF0RqXjSnDJ6NKcKueuGgbCeZNIYbKSt4PePg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB5135 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 04:46:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 217214 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 83764C433DF for ; Wed, 24 Jun 2020 04:48:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C9BE2072E for ; Wed, 24 Jun 2020 04:48:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="W/WL7Ulb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388852AbgFXEsW (ORCPT ); Wed, 24 Jun 2020 00:48:22 -0400 Received: from mail-eopbgr150040.outbound.protection.outlook.com ([40.107.15.40]:19185 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728681AbgFXEsV (ORCPT ); Wed, 24 Jun 2020 00:48:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=csZp0qCKZdbp8ADX4OCe7cVFgmWyb2iphJ1wqJNr5vjGapGWLqK7a9wKi9mKZDibv/cdG4VSFlkBkDRn60KxoQdgpErx6/MaywElJ6t8K5dT6mf0hEh9eB5gxZ6Ez+FW9oQK+QUJ2djDPH+RhIwOXT6yvK6YAiNp8+7UK1tfvgfZPwu02YYHsDx0QLNvNdxZtHwBtJRT9qCH5ofYLL83QwCgx2/fcuUmSLmxbSw7UEr9+hntXTbFayPrFUGcoca5yd7pCIA0LaNgDiC55TEUjSZBMuMU+SIS2SYxcfSg3bsCtaYqNjeMJY9Wbv66it2qs/TIpO15hQ56E1L8oBFJ1Q== 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=5YoEKPAc2KN2ibUm8brhI4F3SaBGZVeebPwrbzzWzuU=; b=fms0prQiAQ8raPiY3cyCRQxc8amycIGdYybKxgK15h2+RpnlB/0QAc/aTaA+s4HAs/cfa7Eo8Tdv3825vipE/YTy7L/WeSgyE7FO6bNIKJGtNFl8SBgvy+KgAwH0bYRTkgOpALWzdhxiPrLhuaHcTmwwApCL5U0LO6TTWB5Ify60eztB4c9F66snSXR9iuX8ZC4O5fVkuiZM93rZNbMuKwOKZqUipTl7EXITdnDRyiFLFjxwgEfeoFm63aynx5ybQ2d7sXoznFgCqTO3RDJF1QUWX3ya1cPs8qYhzaf6c5bbojgQrz3sSfdEkXPUze0o4is910mdrfCE5/pDar9APg== 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=5YoEKPAc2KN2ibUm8brhI4F3SaBGZVeebPwrbzzWzuU=; b=W/WL7UlbVWKqCtW27TmuFQSW6tHb6ZyRPRERi9EnQiBHEdgkxCSujyxMIPWOy4+4CX+2sfKQa1+E+dFTjmUNQXLfJFjaCdN35Bg9t3INi5ZXiIoH2PSkjcU/axid+aWMl5K8d8oJxzVR3Z376mpgFOL7GVqrtt+gCnTA9f6o0yI= 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 VI1PR05MB5135.eurprd05.prod.outlook.com (2603:10a6:803:af::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Wed, 24 Jun 2020 04:47:32 +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 04:47:32 +0000 From: Saeed Mahameed To: "David S. Miller" , kuba@kernel.org Cc: netdev@vger.kernel.org, Saeed Mahameed , Maxim Mikityanskiy Subject: [net-next V3 7/9] net/mlx5e: vxlan: Use RCU for vxlan table lookup Date: Tue, 23 Jun 2020 21:46:13 -0700 Message-Id: <20200624044615.64553-8-saeedm@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200624044615.64553-1-saeedm@mellanox.com> References: <20200624044615.64553-1-saeedm@mellanox.com> X-ClientProxiedBy: BYAPR02CA0051.namprd02.prod.outlook.com (2603:10b6:a03:54::28) 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 (216.228.112.22) by BYAPR02CA0051.namprd02.prod.outlook.com (2603:10b6:a03:54::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Wed, 24 Jun 2020 04:47:31 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [216.228.112.22] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 14846e5c-9d10-4954-16d5-08d817f9b505 X-MS-TrafficTypeDiagnostic: VI1PR05MB5135: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 0444EB1997 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7lTygx16ltwWT8D6XdzKV1UucljKyjUTbucwRcPDREWMUuq/E58nCno2tdTrkfl/0r8bsdBWZuYwhV1o16XVBucUL1UZ1Xfgz+Qx6isWIkeLWgaGQuHCl7dMzEjD2d1+G8u8BnNc3ZkVGQpqlr0SagWZis29BoNPfWCzaUhP25qpj8stMBENOMUFzIuO4nNcblq4T34Zpo46r4/MqAdvxfYARH322m83fnpFdzdS6oxNj1T74zOnaIK6HUncz3x5cZWf9zt2cy0upp4vr8NseEIyKDRS033YDTh/10gbcMcI/GGmGXK+Vrz2dsgvCtM7c8tam1K5kxDGlEuFfEfazMDZGc0V5GMBevpH+fN4qigIl+ratmTer3BEZuCYQCsR 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)(346002)(39850400004)(376002)(366004)(396003)(136003)(107886003)(52116002)(86362001)(8676002)(8936002)(478600001)(26005)(83380400001)(5660300002)(6512007)(2906002)(54906003)(4326008)(956004)(186003)(6666004)(16526019)(316002)(2616005)(6506007)(66556008)(66476007)(6486002)(1076003)(66946007)(36756003)(54420400002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: IMFcOc/d7HtkIXTIaNJqlgkRKB8qoWLEjAhXzewjtGGb/T0jwmjmeuoF1Ili9awxNqJ7WLl4AZ0/o/DV/tVO09D7QT0Y31OEl9GctbGr7EtEPokS/VFzZOgkTPsws/pnraYCfZF6qZ/unDz+1QxAOHIRS0hcfXDPAYAJ4HhQuQ1MBB3Y7DAY5ybXLX+i72Qj95oTjJMJxjPSkLeclTno2TDSipCHPdU+qpBh+X1JbSrXKJ4P/KleGPMBMejb1rEo5Kf33J96S6jPZLQ6HXhX0XRCQMipdn9mjYrAiibbkAGHKu+0+Q7vIKSdmFQyWvFJ55OMKqo4nnRRNhbrlMC7nk5QRzMp/ddcQFmm+1zkydRRjB1PCVgNvev5PpXLmZ7N5DkmU88hilhDfwaLAg3zstDCRSlNOe2EsKHeNIAnfshdiFInglvEOdkyJmWuzcSRdWZaI2SbvnOCwpbtEktgcvS0k3sUaQ1Z7Vx1Y+D91+VGE6jpFzYDR0r5SC4K33lh X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14846e5c-9d10-4954-16d5-08d817f9b505 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2020 04:47:32.7278 (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: uvb1iFQ6esngF/1R/q44HfP6xXTYK9CrSQD7BymIFHezONgJXnU/DT0PnGeIUUmhU8gDB5PMVRJpBIb6xjJcxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB5135 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Remove the spinlock protecting the vxlan table and use RCU instead. This will improve performance as it will eliminate contention on data path cores. Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Saeed Mahameed Reviewed-by: Maxim Mikityanskiy --- .../ethernet/mellanox/mlx5/core/lib/vxlan.c | 65 ++++++++----------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c index 82c766a951656..85cbc42955859 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c @@ -40,7 +40,6 @@ struct mlx5_vxlan { struct mlx5_core_dev *mdev; - spinlock_t lock; /* protect vxlan table */ /* max_num_ports is usuallly 4, 16 buckets is more than enough */ DECLARE_HASHTABLE(htable, 4); int num_ports; @@ -78,45 +77,46 @@ 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); } -static struct mlx5_vxlan_port* -mlx5_vxlan_lookup_port_locked(struct mlx5_vxlan *vxlan, u16 port) +struct mlx5_vxlan_port *mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) { - struct mlx5_vxlan_port *vxlanp; + struct mlx5_vxlan_port *retptr = NULL, *vxlanp; - hash_for_each_possible(vxlan->htable, vxlanp, hlist, port) { - if (vxlanp->udp_port == port) - return vxlanp; - } + if (!mlx5_vxlan_allowed(vxlan)) + return NULL; - return NULL; + rcu_read_lock(); + hash_for_each_possible_rcu(vxlan->htable, vxlanp, hlist, port) + if (vxlanp->udp_port == port) { + retptr = vxlanp; + break; + } + rcu_read_unlock(); + + return retptr; } -struct mlx5_vxlan_port *mlx5_vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) +static struct mlx5_vxlan_port *vxlan_lookup_port(struct mlx5_vxlan *vxlan, u16 port) { struct mlx5_vxlan_port *vxlanp; - if (!mlx5_vxlan_allowed(vxlan)) - return NULL; - - spin_lock_bh(&vxlan->lock); - vxlanp = mlx5_vxlan_lookup_port_locked(vxlan, port); - spin_unlock_bh(&vxlan->lock); - - return vxlanp; + hash_for_each_possible(vxlan->htable, vxlanp, hlist, port) + if (vxlanp->udp_port == port) + return vxlanp; + return NULL; } int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port) { struct mlx5_vxlan_port *vxlanp; - int ret = -ENOSPC; + int ret = 0; - vxlanp = mlx5_vxlan_lookup_port(vxlan, port); + mutex_lock(&vxlan->sync_lock); + vxlanp = vxlan_lookup_port(vxlan, port); if (vxlanp) { refcount_inc(&vxlanp->refcount); - return 0; + goto unlock; } - mutex_lock(&vxlan->sync_lock); if (vxlan->num_ports >= mlx5_vxlan_max_udp_ports(vxlan->mdev)) { mlx5_core_info(vxlan->mdev, "UDP port (%d) not offloaded, max number of UDP ports (%d) are already offloaded\n", @@ -138,9 +138,7 @@ int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port) vxlanp->udp_port = port; refcount_set(&vxlanp->refcount, 1); - spin_lock_bh(&vxlan->lock); - hash_add(vxlan->htable, &vxlanp->hlist, port); - spin_unlock_bh(&vxlan->lock); + hash_add_rcu(vxlan->htable, &vxlanp->hlist, port); vxlan->num_ports++; mutex_unlock(&vxlan->sync_lock); @@ -157,34 +155,26 @@ 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 *vxlanp; - bool remove = false; int ret = 0; mutex_lock(&vxlan->sync_lock); - spin_lock_bh(&vxlan->lock); - vxlanp = mlx5_vxlan_lookup_port_locked(vxlan, port); + vxlanp = vxlan_lookup_port(vxlan, port); if (!vxlanp) { ret = -ENOENT; goto out_unlock; } if (refcount_dec_and_test(&vxlanp->refcount)) { - hash_del(&vxlanp->hlist); - remove = true; - } - -out_unlock: - spin_unlock_bh(&vxlan->lock); - - if (remove) { + hash_del_rcu(&vxlanp->hlist); + synchronize_rcu(); mlx5_vxlan_core_del_port_cmd(vxlan->mdev, port); kfree(vxlanp); vxlan->num_ports--; } +out_unlock: mutex_unlock(&vxlan->sync_lock); - return ret; } @@ -201,7 +191,6 @@ struct mlx5_vxlan *mlx5_vxlan_create(struct mlx5_core_dev *mdev) vxlan->mdev = mdev; mutex_init(&vxlan->sync_lock); - spin_lock_init(&vxlan->lock); hash_init(vxlan->htable); /* Hardware adds 4789 (IANA_VXLAN_UDP_PORT) by default */