From patchwork Fri Oct 15 09:01:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciornei X-Patchwork-Id: 12560799 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90E87C433EF for ; Fri, 15 Oct 2021 09:01:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7307061184 for ; Fri, 15 Oct 2021 09:01:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236176AbhJOJDy (ORCPT ); Fri, 15 Oct 2021 05:03:54 -0400 Received: from mail-eopbgr70088.outbound.protection.outlook.com ([40.107.7.88]:52805 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229656AbhJOJDy (ORCPT ); Fri, 15 Oct 2021 05:03:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=caKmbzKs2yQMJwrZc8yn7PFhLFaLJzNIsx+j/juvz6Q2idrehy2OSvhnHBtKudNAjPbuU8FtiHAiCdxbdajpk6FVsejDXSWfqMv66dCJwGn7HnQaizm4+M3agUaPRs87gMaYuz9+wsW2lSGmwrgPf1h1DSddO2oaLV6sjeoCVpbVs8NnmWIUuv4+4eLHuzyYlBDUv9/u0Z+Q0LYZSTSnHfYDHs5Sm03EWowCO574RV2F3xrphnHvqhvfZVJ8APiprhlPAsiR3QY8FmzF0EKb+lgFQ2npjQg+FD7bVnnbZMYgjivUrqwejpKqbk2JldQcQxyJdyz+0YPOe7ucJVk6yQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fmXP7lyjZivB0Xu+4WdYXwHNLMu2LyrloFeLCLrKDXA=; b=ViJL8k0yOLhrNaavJDbmjqnn1n0Czp1F6DlgThhKDZ7KfpyO0WjbzonpwVDJZnYRWsLHyYf8+CmHNVmgqR0rtHdGtnZbXDv/V3PR2npt2YmW0PCjMg8ImYn0YkhuIKXhpgH6hqKJkzzxAOtgU6iQcO5euCXLtyozkDDAwEsEp4A5josHqlbJYf13lYxZMf/rkb+xc2geuoEYS7AHYsRvyFR7O+2Y4IcD/gDi/nfI+0yp1saipF4xwma2aaSs4fGpclLONYKjnx2F7bEZkSV3LHTnmApizh2K7cK5/wIRrYpRtFRx5ewbV7APaOSi+esYyoAvz/v5yFKpvTa6l7EAzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fmXP7lyjZivB0Xu+4WdYXwHNLMu2LyrloFeLCLrKDXA=; b=O/PmXKbZVU2XqkWac/Oga3Q9/hjcckvmRXbNdIcISopadKea/hcf9qaZlrzjrrSQfmBa6F9Qfiwm9lHziKpgY37U50BsnV8BhrtDRaJPkqccIaxnUYkYfD6isM4ea3qqqsFSRaJbanbN7+9+Pru3QByiD4BbCb3GgmzpSFxYsBc= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from AM4PR0401MB2308.eurprd04.prod.outlook.com (2603:10a6:200:4f::13) by AM0PR04MB5988.eurprd04.prod.outlook.com (2603:10a6:208:11b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Fri, 15 Oct 2021 09:01:46 +0000 Received: from AM4PR0401MB2308.eurprd04.prod.outlook.com ([fe80::6476:5ddb:7bf2:e726]) by AM4PR0401MB2308.eurprd04.prod.outlook.com ([fe80::6476:5ddb:7bf2:e726%8]) with mapi id 15.20.4587.031; Fri, 15 Oct 2021 09:01:46 +0000 From: Ioana Ciornei To: davem@davemloft.net, kuba@kernel.org Cc: youri.querry_1@nxp.com, leoyang.li@nxp.com, netdev@vger.kernel.org, Ioana Ciornei Subject: [PATCH v2 net-next 0/5] dpaa2-eth: add support for IRQ coalescing Date: Fri, 15 Oct 2021 12:01:22 +0300 Message-Id: <20211015090127.241910-1-ioana.ciornei@nxp.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: AM8P190CA0018.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:219::23) To AM4PR0401MB2308.eurprd04.prod.outlook.com (2603:10a6:200:4f::13) MIME-Version: 1.0 Received: from yoga-910.localhost (188.26.184.231) by AM8P190CA0018.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:219::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Fri, 15 Oct 2021 09:01:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ac1d44dd-588d-4aec-fe4f-08d98fba6a46 X-MS-TrafficTypeDiagnostic: AM0PR04MB5988: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2sn1fc2YcGPepn26TTRbg04WaLhBjVeUMEM5bqLrtnaDpZKfbAg0SgOqee1ss4JoziwDhdnsuRZqeZX0oeQOIpT1OUgIOpA3IB5mPVKdv12cSbzEr0BwC/SxvWNnirtlLo3TvDoOfe8KJW90hexhbFghB0gM/hKCHeo9/O2kc8yJj5VJjSRng3/MyYxap7828wo7ocUFD0FM3ry226J38J6X/LQSczuP8ZF2PJpOg5Bwel9/CmVt0kymr+dzezYi/LQm0j9KvnrCYtlncaiKjxvJOZnCf3AMf4fplWsGkbrHFS1blgCeKbPi97bOrqDNkZM80evusjnS9cuvgmF3ZeKU8EUKfJAhwiMG2kbLCdnQtEjHQsAzpHSV0DJ1t6pM70WAtlsYpJTLd62YjwO5giBpsQnDOD3jZnlQ01zrmRpR+6QgCQMp3xi2/Mvnfko2CDqs+9QDYeAODQ+V/1ABLB/s5sV+JGRNCN0rFgD/+LFJwk44nhYEzzudZnrM/xbW869J8+wUwoHmdlmy81sXOJGV61LpxclMjUrqiv6MLera75+ulNsuSGpuDXVsloiA5DPF9NbiSl4LgInHu+Tn5hyyAuNy2lzp4wRbE442xulaZ7MdeAdIlYAkzCS7FP74Q67YRHbUsN//48bJ/9ZEK4ctkdcdyYijxJV7cp3dyVB7g4bKi0PGSaqMpTNfz9+dPijLdpM93rQBAfYFMWCZWA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM4PR0401MB2308.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(5660300002)(2616005)(956004)(4326008)(44832011)(6486002)(8936002)(36756003)(8676002)(86362001)(2906002)(6506007)(186003)(66946007)(66476007)(66556008)(26005)(1076003)(52116002)(38100700002)(38350700002)(6666004)(508600001)(6512007)(83380400001)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: e78T5fEzVHgyyAHti1Uk3GW5QbBchivCDDApcamAyfcr3Rn+VBWphOc/qMNUMKrMdXmgh/YlEse1klhTC0icu4A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QLYVxfpOVkVXBEngGK3gVz8CIbbhXQvlB3TQzQfdN3As3aBvZWi0j6TNqZo/m/UXG9XMH6yst6DFne0yYBxtxjdpgwrELKnDmWlw8NqXq/PUUZR6hpurTbkBdg4rlgdqpb+LqRkxfBC1sC/tk4Om4LhEmqREqHw1leTvxxaXk/tfk7g6RzQgVMEo1J8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac1d44dd-588d-4aec-fe4f-08d98fba6a46 X-MS-Exchange-CrossTenant-AuthSource: AM4PR0401MB2308.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2021 09:01:46.1111 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pOTNyn0M4QoWwEMQVG7cdwpYU76zYMs9Y6DpQ9W9ZyhF/cMaxOES/F7UowHdGsG6Pw/F/AuYZqN9kjQe1wbFvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5988 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This patch set adds support for interrupts coalescing in dpaa2-eth. The first patches add support for the hardware level configuration of the IRQ coalescing in the dpio driver, while the ones that touch the dpaa2-eth driver are responsible for the ethtool user interraction. With the adaptive IRQ coalescing in place and enabled we have observed the following changes in interrupt rates on one A72 core @2.2GHz (LX2160A) while running a Rx TCP flow. The TCP stream is sent on a 10Gbit link and the only cpu that does Rx is fully utilized. IRQ rate (irqs / sec) before: 4.59 Gbits/sec 24k after: 5.67 Gbits/sec 1.3k Changes in v2: - documented the new qman_clk field Ioana Ciornei (5): soc: fsl: dpio: extract the QBMAN clock frequency from the attributes soc: fsl: dpio: add support for irq coalescing per software portal net: dpaa2: add support for manual setup of IRQ coalesing soc: fsl: dpio: add Net DIM integration net: dpaa2: add adaptive interrupt coalescing .../net/ethernet/freescale/dpaa2/dpaa2-eth.c | 11 +- .../net/ethernet/freescale/dpaa2/dpaa2-eth.h | 2 + .../ethernet/freescale/dpaa2/dpaa2-ethtool.c | 58 +++++++++ drivers/soc/fsl/Kconfig | 1 + drivers/soc/fsl/dpio/dpio-cmd.h | 3 + drivers/soc/fsl/dpio/dpio-driver.c | 1 + drivers/soc/fsl/dpio/dpio-service.c | 117 ++++++++++++++++++ drivers/soc/fsl/dpio/dpio.c | 1 + drivers/soc/fsl/dpio/dpio.h | 2 + drivers/soc/fsl/dpio/qbman-portal.c | 59 +++++++++ drivers/soc/fsl/dpio/qbman-portal.h | 13 ++ include/soc/fsl/dpaa2-io.h | 9 ++ 12 files changed, 276 insertions(+), 1 deletion(-)