From patchwork Mon Nov 7 14:38:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 1277 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2095511wru; Mon, 7 Nov 2022 06:50:05 -0800 (PST) X-Google-Smtp-Source: AMsMyM71atYIN3SXnWie9/xRaI0ZfewoCI1n34vc3YoeOrDcFI+UpCEBmnCq/BpM+D5CeHPlzH19 X-Received: by 2002:a17:907:3f85:b0:733:3f0e:2f28 with SMTP id hr5-20020a1709073f8500b007333f0e2f28mr46175153ejc.376.1667832605359; Mon, 07 Nov 2022 06:50:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1667832605; cv=pass; d=google.com; s=arc-20160816; b=G9QTSv8Z7Ks1j4Tflh66uxb/xm4E7g8BVgg5EuGO1PIt6habLK+4VIPI44M1ZO7caW Ii1w707oTzYYUTT1zMwug5K45grTIE4tVVi9NseKW8tX8JeRLA0mxJZ+3NN5OgAcW417 roPLjVij1vcY0H9ltw8vDb4IdzltV93l5rU2sZhEYety8c/+RobjmzRQB7cfe8TKfTI3 5mNf0NHVK1jBBtGZq/q13hVi6B8SVd/EJOhDtJ2hdFlkfQkaeAuyY6n/oiVLw0dOkLBn irI1Hy/+LRFkvlQ8vhsfBPPo4nQ81sG3dsP7ay0w+BX2lmj2a5SXmQ2w8tPWX4aXgvpX FC/Q== 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=+DMi05oM+ZJ69choAeJAxEp8II5Afox17XDpjRIM1ts=; b=ggbwzVDaPYqi5nkhSmBYUfmrT+kwSFgT0KbvX13ECZaa4Ryzk+oecWw1vjK3cs6+et 9/JOb4kv1bsmPOh7DnoOo4XFEVbGqZLYMXjGqFeyYt/UIpR7bzQi60oHWENJzbqT8h7O NgllxQPAmMzmAHO9NC5jePlqNwx67WNbwbk/miI8f95z033YNHFwV/j/ua39/ay5NgKw sVLiZdlMXB2l9ivWN4BcggQXVgA1Q0CRBw/QIZtjpaphDqQZGTWnV0nMVeY1cAIMU/rA stAYfhtyEkxYX+3clJgXuF9KUsHzu/7ekoXeI4zdA4BPd9bZOvlxocwbwxNnhrcMXjFh vmGQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PHkTXBT3; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a1709064e0b00b0073155abc1b8si7821602eju.154.2022.11.07.06.49.41; Mon, 07 Nov 2022 06:50:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PHkTXBT3; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231790AbiKGOiz (ORCPT + 99 others); Mon, 7 Nov 2022 09:38:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232363AbiKGOir (ORCPT ); Mon, 7 Nov 2022 09:38:47 -0500 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80087.outbound.protection.outlook.com [40.107.8.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0633A469; Mon, 7 Nov 2022 06:38:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YN9wmr8f8Yq08deXaQAMcSO2gu6D8tvM0EKgeJPEm434onptuONQxdoXkClLIY2JnGFeRw/M/2rQMVmejkU2g5WhQyUJxC5Tr8yHq/8Lur6GneoXkomk329x79H/ZaVJeKjGgIcW1pkR7jNOAqJvzZpFlNkiBa8ks5Nlsc1VCwPEk2pFuoFBH3emPyq0XjO77ShxyAphTnsGzpTNnZqF5SrLEek9sY2GkVUZWhFe5pssdjXgUO8eH30AD+v45lztMak+VYE84Sx1AukbqKjrkovG9oDJeQyIG5YUva+eFUSchBiLsju/OfuDap72UDnGqM2JMPp244RHEdRq+5n1Fw== 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=+DMi05oM+ZJ69choAeJAxEp8II5Afox17XDpjRIM1ts=; b=ICjrVMtNrzioFpIjuDBhCN+O+G6Wh0TpP55cxF3mgfkElleiRI/kg1j4749Gk7F9cr07+Ywtup++BqhETKaEJyKLTM81P5Z+jJQPEo5KDQewhgNZBzfBFcRHOrTqEiVPT5v99EOlyvV81fv5DPajKbl7HyKOT2HZbe5udylqOmJC4iKuWPsLIc/cYOsa8wS8DCts5SZWloeQ0BWz5rGLOSgA+cjRUfy6q8x2scp8GI4y/RS0pmYGCVU6n54EtFDL9YYwiy4hTcxmyy6gLL4lOqdAjp3twOTU0VnFgMWbbqw5kU+zL6g7HVli52wHENNItrsRvVt5ygtFEuITdV3Aig== 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=+DMi05oM+ZJ69choAeJAxEp8II5Afox17XDpjRIM1ts=; b=PHkTXBT31IPSB2zXyIbmF8+AjRPF/XkN2QQcRJDlFfK8nrBw5tzqRMbPa5BwLVSoU8BPQjYuIjKogg8dxf4gZ2yyZM3Qo8l0E5DzE7En8KpJZz1ryrifjJ+v9tAggy0BeqGkPMn7RpVdbVDm8nGzqgU4UtCycSd7Qi1zirEgdP0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) by AS8PR04MB8385.eurprd04.prod.outlook.com (2603:10a6:20b:3f3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.20; Mon, 7 Nov 2022 14:38:44 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::b1ab:dd4f:9237:d9f8]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::b1ab:dd4f:9237:d9f8%3]) with mapi id 15.20.5791.026; Mon, 7 Nov 2022 14:38:44 +0000 From: Shenwei Wang To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Shenwei Wang Subject: [PATCH 0/2] optimization and statistics Date: Mon, 7 Nov 2022 08:38:23 -0600 Message-Id: <20221107143825.3368602-1-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SJ0PR03CA0239.namprd03.prod.outlook.com (2603:10b6:a03:39f::34) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|AS8PR04MB8385:EE_ X-MS-Office365-Filtering-Correlation-Id: 501a3226-2591-4b0f-af41-08dac0cdc5a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TSC4SCX6sxROVKohOwbiYa3HSvvj9hGS07lDL4u5EykjheK6SATItosIbzGb+IdRCfF9N6hfwCqm+2+TTZtWgXmOqgX/jE2Y7bOjFCI9dDb3VeBdqsRf+APaVqxpKs2d6DVQpIx9rfnTD/Oc/7q+s5NPl0k/4dAP8mOV9hM+QE8i7diMlUBl/KLO5SVZCG8lstMRn0kepCS8Zt4D9RWAHWEfM/zZLsnaGtB9vY3+MxW2M4IocSB1/5C5B6BjfHP1NM+wQAvkm5EwKJUkBseKgoMo0/naxYUGmn6QIS8tXpZ/UUvBK9v0kIfDnKgL6S70QcRRAOm7zWCzM6GsXHiOOAIzsE8LCLGgta/ibpGrpInLgv1gA2VHxD1zXj+Qs1Y2+1wzqVXAt/Tlrb7FwVmR+aF3S52e8sTKR1WCUxNopJv8y/W2Oed+TXf6/XT/gfOPxl+z73QLM8yFvthN71oNummH/HP8Ns9tos9nUtVie8Rbplo+Ewz6jbpO1rTUp6cfSTj5Zd1g72AEzfjxHHR7lyTxw4cDKD+QNmnQ8S+6hjbRPxIUC9FMKfI6Ut69UBoPK1cldvq5YEY8xAuOOJFe/Wtonpu1nE9DvTsFYe8PcX/3Q9c51VUUmJzdT5CF44QeScuZ8gt2wRk5TtqJlLmoX68uOs/6GPnujZ6eLoRCEhxyiGcGGxPQ9Q+hP34VbpVpNHcM9+lP3xEBMS/K035J/5cW0w+U6edsVbFrWmujFda+C6lhE/ufZk9N2Dmy62l3mypFma8mJsSCVXfhfcpTu7vfC2uutWF4GOdLk7cS59Y= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9185.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(376002)(366004)(396003)(39860400002)(451199015)(2906002)(66556008)(66476007)(8676002)(4326008)(66946007)(83380400001)(55236004)(52116002)(6666004)(6506007)(966005)(478600001)(86362001)(6486002)(2616005)(1076003)(186003)(316002)(6512007)(26005)(110136005)(36756003)(54906003)(5660300002)(8936002)(7416002)(38350700002)(38100700002)(4744005)(41300700001)(44832011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CoLR29I8VFz/jSwGSXtK0LAIzKq4imHdZN9tDX3UTzUOL/Nh8YqOh0YOrzPPXxkY7uz0TZGtVxNWzStckCJtmcXfp6BwXnE5lHaNusE/Cd72FmSFzgArAsSxeGknSh17g6hrRXEAZzQjSxxWQ63zTih7vlmnajQnmHDQVyRG+px9nOo17qIp4P7xhq8+dBKZggO+0hb0KtHD7pL5/Y8uk+JzZGajbaYfbi95vzEdKbCX6q0kVUDpCzkIfo3yQpzdSFoxO9uVai59we1xyCJD5KlN8oDpeKBmxO0w3ZNenzS3c9y8AWhuQLyrDJx9rIsWE2heQZFYUdSSK1clIRg+PkFsgGbEj8oanXdCABnSXA1St0Qx/OHp+gfdkYrPzSbY8Doiw7kaaGMkWR2obj4vnHapm3YSPxmXBVqST/JUdeDvL2oFYjtxuYk6paxKfYbrv4+XEAlgnOfiMRDZClAXV3aLDeWCJTmM/pl6i8SFoxsXACPT/+pFj7dvVExluSe6FaTkJtLo9BT53fswvChY1bjSxBqHXdP3Bu/W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com X-MS-Exchange-CrossTenant-Network-Message-Id: 501a3226-2591-4b0f-af41-08dac0cdc5a9 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2022 14:38:44.5125 (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: vrojEz9ccSewb6H/Y5MRQRYzj3MxihNh5XQLC+UowWnvvZRFXp4t4MUz6ZQ0o64VYggztYz1xH4WRzAO4++y7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8385 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748849242324415653?= X-GMAIL-MSGID: =?utf-8?q?1748849242324415653?= As the patch to add XDP statistics is based on the previous optimization patch, I've put the two patches together. The link to the optimization is the following: https://lore.kernel.org/imx/20221104024754.2756412-1-shenwei.wang@nxp.com/ Shenwei Wang (2): net: fec: simplify the code logic of quirks net: fec: add xdp and page pool statistics drivers/net/ethernet/freescale/fec.h | 12 +++ drivers/net/ethernet/freescale/fec_main.c | 119 ++++++++++++++++++---- 2 files changed, 109 insertions(+), 22 deletions(-) --- 2.34.1