Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4011103pxb; Tue, 25 Jan 2022 01:18:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmb238wAIvbzbUfQFkJsCF4hHd/7MQY+eMVdng7MsxE5qXnOuvow8EKwe2xyJ8775I7YMF X-Received: by 2002:a05:6a00:22d2:b0:4c1:d0dd:4b with SMTP id f18-20020a056a0022d200b004c1d0dd004bmr17816117pfj.59.1643102336491; Tue, 25 Jan 2022 01:18:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1643102336; cv=pass; d=google.com; s=arc-20160816; b=S58PFNo6CiE4rh6fzvVrGY5vppYEWDGhAbL9gBOTfjJQV0eFSqVCiWTXRM+VwsPj/k FkQo4EUSKNxDKXDo5ZgjGcwG3HdnT6yofrPBCNkpFOZ+SKjv2t8+COhVoy3ofzywNoak GfTaJ+O4Kp1xsVhhRz53+lj7RfeQvMPFuYfS5cEGCWBPaGyKTjqjRElZfWlTyAXFdr/o MmoiU/1TI/5TVf7xBXbBH1MFdlEhxRoUFRXAptVIrX9KpfUXRBHGsNa+QNQJunJdx4a3 QaQPbNiejm9UEu2k2mENP4I/hFQo22F90JIqSbQy9IBCWxtnNlxUjr5kYXRPkUgYbxRx BCYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=whwbk6T1Kv7OS5XtcGVmvmHi2YEiBJy1sgZHu+PwC3U=; b=g9JGxCPqi38ZJnUDhubsUNEBYBL8vH29Yh4NmFzyaGO34LK8fHB9XOJEFHfeNM6pp/ SLb2eCEbbovEYHM30FokhJR1w1lE+YnNQFX/LhZERIBhLyCS4dbl/3uE7z0B0WSkZR2M Gei/0CSN4/iF9HB950Add5WchF6lMMEnGllkzMXtd8vQNx2g5PqrmwgYi+DTUvoRzC/4 tieesn6zH33GtILiT51c0ZjMSJ54mfJZpdfXGupsjNzg4To5d8yZ0m2eL5Rz90aqVJDD 3CIMcdHmYOQs3nJwnYxW+onz83Zu67gWUfawZJUwGZ7dxnAp3LEhCGD64JAtYbuRSDUv yuNg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=eef0zLr6; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si1635813pjn.99.2022.01.25.01.18.44; Tue, 25 Jan 2022 01:18:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=eef0zLr6; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444133AbiAYHTY (ORCPT + 99 others); Tue, 25 Jan 2022 02:19:24 -0500 Received: from mail-dm6nam10on2098.outbound.protection.outlook.com ([40.107.93.98]:28769 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1443610AbiAYHPt (ORCPT ); Tue, 25 Jan 2022 02:15:49 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aHIgFnHJLcrBwup+2GzNl9qKd9rtAD10PUN0KNUpryn+7FCxDwY8JO6oU4RA0HHNhHx7Iehj+qLKrt66qMyNwPz9ACPlxQxF46z8FKIgT9ZDin4Ih5d0KXP92tBm73hOIjT53wkRHemcrsQXCCMtRupO7Tlfn4f5xMkl//Ppwsy+VSBAb3uJS/XEJd9y/wSEcf6JJBa9IryPUQVodqQ7FhfaBR1EcXG4MlQlSLxA5YXe9ONam2uQvMwjj3jWOmsdkNq40vRJGBrGZzuvDjOsbCNN5RQ/Q3fGERTa9c2EIOBJuwyE0Q/Xg+n5sfPlkpO57PasJwov7ctrE58hA4F22w== 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=whwbk6T1Kv7OS5XtcGVmvmHi2YEiBJy1sgZHu+PwC3U=; b=fWKrT8PNxogRG+OfiHtsOWdk8shjKAi72ZjohWLV4rrwiCVLcPlk5XADsAEqUWuhwDFgftID7l0hdGVLQbsbDCf/Q+82QDOZHPbjKef2KvbV9bVhYJuZ9iXmfoQex9Aw9egmwNteoulhEMlN3Gbv69D6AC6s61Isdx7pDZ+F31rOJXrOE3JjJUQ37HCakHs6+ThoCqjxLxt1mqpLJPzXkFrsxYLso0+T3ah50IXEvdecEEtiy5UHb0YUNDIsbEuxvGqX2f1aY5GnhqMEj+SgDohzNAKe6DdPxzmNY60ohRtMxMK2F95LFhOi0dBiGHYn0DlJ58pxnLt9Qiv+U5jZFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=whwbk6T1Kv7OS5XtcGVmvmHi2YEiBJy1sgZHu+PwC3U=; b=eef0zLr6WabcEMANon+YwlKU23aOMhelr1oUg5ddboYHJvYLVl9U4yiz3zaZNBVKxe2AXn03Cyy+z7U4o4IxYKx9SLNRaK8VEkKtqYSLQq3IdrG6TCnhBo+mkhHqCvJKEhaTghq0jsAXYlrJEChIK+nM3wM7hxN/GNCY1KLTHCk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by DM6PR10MB2538.namprd10.prod.outlook.com (2603:10b6:5:b3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.10; Tue, 25 Jan 2022 07:15:42 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f%4]) with mapi id 15.20.4909.017; Tue, 25 Jan 2022 07:15:42 +0000 From: Colin Foster To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Jakub Kicinski , "David S. Miller" , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean Subject: [PATCH v3 net-next 0/2] use bulk reads for ocelot statistics Date: Mon, 24 Jan 2022 23:15:29 -0800 Message-Id: <20220125071531.1181948-1-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MWHPR20CA0028.namprd20.prod.outlook.com (2603:10b6:300:ed::14) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ca33d131-be8e-4029-6b89-08d9dfd27f1e X-MS-TrafficTypeDiagnostic: DM6PR10MB2538:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1468; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Rf8IusnZ4PignErdSDd4o2SRt5RQuXz0hokH2lil6HAuUug1XtvNiQeLrd57NKf9Iuzjug6CTLbiP5MXJPssgGWgnTGC+xxgwjJYWDosB20DSirMlO7MdBvRlbAn7fMOs/BR5cSyGfg3SNBct3epzvYrjVZDWrRDc7gPRYaBRCuxHS4fm9OaBTL1Xj9zVJTIKXPXXK/TRIOhqCAF9zjhy35dmRg05pYkwEkHXjIuMGldB9GB/goxhZIpf49yBk0Fryo7mMCJKHkj9BQPzpbLKKYN+q8oEqasPBOBMZoZf/837xcutgT/F31VQZDF3BH+Ijy5c23/XqVCwRR7cf/VFmcFJxp5dHtk4cBtHBHFrKRpiHLfXwsZwMLcwdTJGakLvnqTl4dHUz7+3biT04Pz7+2GcXomky+z+2AcvSTZgKwWxPG0SsIl/e0Xt6aGTbdLBWWRX+o7VMjBAHDE+0g6v4EwHZa6/x+hH1nDQZLMUc2T+k5KTtV4LAKsJuRjx3LRw35Pmpq09+Z8OrhDr128aXhlLVOmNwel9eSxe3JGcqeMBEnpO+oFEcTLY0C/2E8U6kXRrejn5TIq6izoHgzMmwtTON2v17JC2W5nJKZfWZj+6uFsujgIgK2qUWhMr//aaZzXStpX6NnamJHydUC7FF6+9w/GUGiL1+cQXZ1npBVZ9DUP3gdBR444gzfh3pbS3HKrYNwXH0KAOoYdWLiHEw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(346002)(376002)(136003)(42606007)(366004)(39830400003)(66946007)(38350700002)(6666004)(2906002)(8936002)(36756003)(38100700002)(508600001)(6512007)(2616005)(8676002)(5660300002)(316002)(4326008)(44832011)(6506007)(52116002)(54906003)(86362001)(83380400001)(26005)(66556008)(186003)(66476007)(1076003)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?tL3ECIwNcxVRDJVbxn/zjALW9Bv+W1VfQT9RLxQAEZ9Nn+s9fYzxTSv8/WbX?= =?us-ascii?Q?7iIWchIwZjhPhB3wG6H0U5qbHKzwC2s4wHnIRseajwV1bupfT6wu2wAhDK0X?= =?us-ascii?Q?1w0l8YXN4Jxsh6iUsWLy315Qcak1eeO805ErHBg8g7Du0+9yaIkJGJtKk7dC?= =?us-ascii?Q?xEgXuWHAywlNRi/HbJ0o60LBmbnCYt4Fe4oxTh1+BT2wkSvyThhf5LVS4qLF?= =?us-ascii?Q?hDUweMvMYVWDpyHWXTIEb/c37An896Pgwi/ocj978OFBZs0gP8NgOzOq108k?= =?us-ascii?Q?aYmiESvpjOoJJx7JGKaRt8RG7XMztCrIg1mk4jn5uj8WJut/t6Y6Q7Q0aW0v?= =?us-ascii?Q?igRj8VQ2IdlmYsa+XJ8WwiUnTyb04kTh062376kwWtFITT6UZBwhOUCGTTKN?= =?us-ascii?Q?jWjH4wHWVDco4uLECsT6uvdpuwYHdAvyUxYKB1aBcjG1MpnMEvC4JFVteasq?= =?us-ascii?Q?u81snHFv0ucerbrwxpwlsOXA5NUKDVsqadMvFP6fp+8AynleCdrcogVHDRe4?= =?us-ascii?Q?P15AfsRiG7ab+ubeQEYy5lqFdgDEZe6vWA/49hGY7f3Ejc7b4FeOUgBtdNUU?= =?us-ascii?Q?a9mJRmPiiE6wNyAymSXei/Bqn9zBgH5KoXN8O0439srCxudqI1tPCWqcpy0L?= =?us-ascii?Q?8fZPR4qx4D7KsEqvCHTOT8NCTfPHuOK5UPrvfcUN6XhjR3PS170jfn/hs5V1?= =?us-ascii?Q?EU2fJWvHjO4NqI+1pzqlkNkSg0MLkBY41F4iwjF1Vyi2S13xFgSoudoZ/HPK?= =?us-ascii?Q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dLnVU7gRG5gI?= =?us-ascii?Q?qs4FcDjtVMPEORVOxxSeSySoAOo=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca33d131-be8e-4029-6b89-08d9dfd27f1e X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2022 07:15:42.0805 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Q4fHVN8QsNy5bV4IVrViGzhSRdWOKJ9e+Jw/QTqrx+cKb2vl2UbXtqnSMcDL4Pzsj6k67FmlfY8Ah3G3inxcaXeJL+CCkKN1PFHJpc24X2Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB2538 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ocelot loops over memory regions to gather stats on different ports. These regions are mostly continuous, and are ordered. This patch set uses that information to break the stats reads into regions that can get read in bulk. The motiviation is for general cleanup, but also for SPI. Performing two back-to-back reads on a SPI bus require toggling the CS line, holding, re-toggling the CS line, sending 3 address bytes, sending N padding bytes, then actually performing the read. Bulk reads could reduce almost all of that overhead, but require that the reads are performed via regmap_bulk_read. v1 > v2: reword commit messages v2 > v3: correctly mark this for net-next when sending Colin Foster (2): net: mscc: ocelot: add ability to perform bulk reads net: mscc: ocelot: use bulk reads for stats drivers/net/ethernet/mscc/ocelot.c | 76 ++++++++++++++++++++++----- drivers/net/ethernet/mscc/ocelot_io.c | 13 +++++ include/soc/mscc/ocelot.h | 12 +++++ 3 files changed, 88 insertions(+), 13 deletions(-) -- 2.25.1