From patchwork Mon Jan 13 08:22:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Fang X-Patchwork-Id: 13936907 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE4D3E7719F for ; Mon, 13 Jan 2025 08:41:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=iReTsquqdakRgLXsk9K1+pSqIKZ5BbTbYlGf+A9WAc0=; b=1HNtIliQr8MaeAEI8PvHDCSt9N hCfu0UaXVji40oMnfu9C35E6GMz1InP6E1ycGOmzkvSCDOJWGV9vT1a4JZQ6CxBICpZ1V+9W7GDzn ssnf7ulf0w8t+B5VBN2bQf0qsntc9UlmXbrYjRdxdLihc6b8uxpL7BUgyeP1VvD27k0kVyCCaWzBc Tef8vmT50CzewTNxXlcrIXqicby2jvauCHFBDrVxBnkJY4TJU85B1sP5LpbflASixqozOfePFS2Bf ooWIoJLBY5Y31zxwNQgCw//RqErJw2aWy7tPJVxhrMMydgbLds+OvOyIzhNd8Uvf/WWJpqHjZFKUd +ybdtMTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tXG0P-00000004RIP-3ncV; Mon, 13 Jan 2025 08:41:05 +0000 Received: from mail-am0eur02on2060e.outbound.protection.outlook.com ([2a01:111:f403:2606::60e] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tXFzA-00000004Qpg-4BuT for linux-arm-kernel@lists.infradead.org; Mon, 13 Jan 2025 08:39:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WSX9APcYRxNvipmlWxDM2SBlPqGPkQMyRcUovDtWWUSA+g1tZTRUddPFcTUBgNRJXIO/QljiHIIHKWObMHwZFKhThW4RW4d3klkyucZn3e8qASLP19UzbAO/pGwIBLCMCiyBAcT4DWAQQ4FsxUmy7VbJ4Fwno2+B/1twVg4isHtawaJlcWIauzKUhIo1moA48xH9qB6RxOZ9iVkF1sBKI7d1ROy9BOUajK7hb+wEm3dGsb9XmvkeTWm6FNvGky2jxWP+PM38PDXSFkvhqIFLtoCTzpOr3SoAXQmL+Sq+DiLrGQ1ZrMGlHmMBcRm8imwMip/n1MO2f5o+gJIa7nq9QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=iReTsquqdakRgLXsk9K1+pSqIKZ5BbTbYlGf+A9WAc0=; b=qkxmWZ0J/i/vOzRanLMWC9gXlMaQaotjcc56qiJR3NvrphBihA1jYGYtFAmB6t1uCBz9Y4nQih8ugw06JJJNGMAaIuJEVfm1PEF0ostJPaKZtq1mbpMcTZyq/AJAcRsy4FhINMCzAcie8MCFlp+niB94LRphjPnzcITzEMpaVmtNB+pw3E662ZeVD4SYRoCh3hjaiHuI+TIUPWcyXdHxzd6cCWioqKlJ0yy5OGnusVqU99oiUJVJCvXWQTkg2GoiT9Wi3iAaWAfAstYszfk2gVkJaBfCIIV2u28jZqBMKz+8lwzlo3nKE8mCj1tssic1xeSySg0Gz+zgkcneBuZ4Pg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iReTsquqdakRgLXsk9K1+pSqIKZ5BbTbYlGf+A9WAc0=; b=cwsGne6qrjMMulu1uxFrEhj6QZzUp+5YUbn5CY/kMCPM9KTHCI+u3dP842gT+/QRy/lE6e1/1UAmRJooF2ShVwJGVzuqyC+JMGD7MEjFcLPE2QG7iMdKpXFbktbe0FvnawQW5qdS/O4rARgnU1CS/qjf5/v3EY5ZEh2Jn95J2IZPJEiVXgEuq+JbLiakhuqmS8kzOMTEHbgSmhI0qEY/iQZ2tLiERwRfoeU1+UpGGDdXM6Q7J6OgSZ6xbAN/kIKvxGeKYT8L/7TAoGKk7DXa6DZuI2TJBFNY8TVs0ZwRXd1xkDtdjyKdss4/GHad19+umkSTjCKYSY4QLeHxhFNILQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) by VI1PR04MB7101.eurprd04.prod.outlook.com (2603:10a6:800:12e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Mon, 13 Jan 2025 08:39:43 +0000 Received: from PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db]) by PAXPR04MB8510.eurprd04.prod.outlook.com ([fe80::a7c2:e2fa:8e04:40db%6]) with mapi id 15.20.8335.017; Mon, 13 Jan 2025 08:39:43 +0000 From: Wei Fang To: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, xiaoning.wang@nxp.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, christophe.leroy@csgroup.eu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev Subject: [PATCH v2 net-next 00/13] Add more feautues for ENETC v4 - round 2 Date: Mon, 13 Jan 2025 16:22:32 +0800 Message-Id: <20250113082245.2332775-1-wei.fang@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SI2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:4:196::15) To PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8510:EE_|VI1PR04MB7101:EE_ X-MS-Office365-Filtering-Correlation-Id: 855f30ab-de4d-4e93-6989-08dd33add378 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: IO15KkvSJHfKVkHQkxN0TXjUKo+/EokHw34826Bt07BU0pmAxgbWn9Sxutx381LtHM6Ja+8RjfaO7NtQBlD5D9WJOW4hbEsp5EeXGk213BTYmwcMfHWT2kN83KdpSTDlaNuOgZXgbS/cV88kIJSJ2d8GumgFMzFsihXQc+qdZr4UtbR7fgjxi34ri2Ft4gr7/L6BRZkoEcA5/jO6CEQx6HnCBJxd3DubiEnqLdnAbDLahO0ouJ4v+3U7vyOD/4GU/G3F2KRSDc3a6o3PRX0CQ70omrkjAN6yntpZljYzaUXVT7T2B/+9NuCvW7s8W/sPql/1gtkqFJtJeMmrbK9ar9q3SfLbHUF7TaonMWs6nWPbBOjga4gV7UbGyTRctpJCjokzdmU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ront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8510.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +jTl2iKLrPLJ7MnDc/h25Gh7q7qu+2JJiiy798NM+iixwTWRPDVIBwWa5vMNNk9UnyB5Rqm9oPqt6EjK4j54/xvJ3TU9SRryro6/nh/5XKoeHxEhyhMNxnFJTBfHBTY9mEvOp+QdhsxGK9rWRxzznji5s9bWmb+Q1Ef1TANwUa34K0d48rC8+1EJfQ5S9G+TumhDfRCSyzRXybvWZMxM+C7JhJr/3akyJaI8dwnJ89NWrLaGoRE/RRmimk3rGsMntVCze0emxIUjOBaRUw7PLjMzmycKFws9Zb7lqXBcFil6ZBTtWFnKIKFOAom694M57h5XMTIB7r9THeHhVjfJ4uh2Lm8q4aPzl67DNk0lrSKQw9R7OXPazVdd7TWntSp3A8ON8yxaahiygavfSGSwEZ7XjZv7gu82iUFsqnmQwW35zBxPEfJa+1WBzmuAk4zKg83+N8GOUBicTEV4jWPCgkqHd7VsCk7D1BljCV/XUGorao6uu690Q787/zWdKTolntilv3s/rBEpvVHY5UBSHZkmRQCqIQXQlz+CIcB9vphyeHC2Y3tH9c00o3LW3pUFhuOPuthzFzNvE8k4yQrfo0md7f862kNegc78MjbDzwQv5Nn9zbgsZjYtIfubripMFnEBwX0yWoHgkwCfgPgs3dm+xjpiS1/vBLTlywfYeOteAVigUAk2Fe+rYdRpARw0cAfrMFl5LvOCkz9W56iczGxRKaUG++kTkObdkPD2+GJWXIq/pmGlZTmPaWyW14hcUjFJp0MsG6BalZGp9GDtURgMiXL1tYZkmd05hUV8Fcn49pid2sjcEizv4m+y9rzWnQf8xX1y6K1wgIRxrtH/ipl0bS1Rywn3GuR9h8AqHmoo5t8QCWWma74r92wt9DjySe54S0WB8xSL9tcnIbLw2ejgzWT5F7k+8lgKhw4Fg4FS9wXzeORpcHiBn/1TnEXlj2D2H2i2Ot2ZrQCF4cyaNVIM3SNWbmZHJoxnQxXq6F3//f47oCZI2EjrjGNtYo6sCj7np8JoOXXLY9KzZDzOpJzs1GpJO6CLSAXWZbZrlTPwoehmhxE5NHNGOY7IT6HMx2J9yl2M8BNbstC5T9R/FoaZeBamFkcycefvD025uiT+opOmG5LMu3C4b6EChxlpypLW/SGPdSXFMm0KFJMwe4sSgns5DlK77nnO4TAMxiulMVi4/bMJq24vsaJ/B2GjX0KJ1CKtin8xLOTa09vtUG9MYlzmfLJO2qprRCkkQAW8MB/mMD9xwcltui1BXj4Rpyd76Kx8JTgn0S6kXmHQB2/Hqp21VK6SY/VPl6MBLTYQEW/DwXXlIuJFne37x14MSqza+C85iCUdriV8sHiXLvV5rsECLb3POxNpbUXDV4d1rofisfDf2dC6wK3TJkUV+55gn68cjkbrFGKHhgUfwwhWf1sV3MnKg+XpZnI6CrkItcPDfDFo9m8FT8KAXc6s5SKVNZQcR1a7iKJ+L++sBdL88JvdPR8UjJBqxLhfoCL/7Fx4Oe+p++v1cMtiQtzlWrsGHX3ZCumJPIzFzHkHfpE/qqoAwOltCMKFiqb0mxg998LiO/dOnfOBkX7vuUkv X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 855f30ab-de4d-4e93-6989-08dd33add378 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8510.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2025 08:39:42.9270 (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: RnyMxQTyQcPh/EzwqTH/rXW1FgVpurhz5syh2OAhygTLzoHmYdZqlLWLPaqj5SuaBnpLLPd/jyBC0DzxvEnXgA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7101 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250113_003949_047152_71CE0499 X-CRM114-Status: GOOD ( 13.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch set adds the following features. 1. Compared with ENETC v1, the formats of tables and command BD of ENETC v4 have changed significantly, and the two are not compatible. Therefore, in order to support the NETC Table Management Protocol (NTMP) v2.0, we introduced the netc-lib driver and added support for MAC address filter table and RSS table. 2. Add MAC filter and VLAN filter support for i.MX95 ENETC PF. 3. Add RSS support for i.MX95 ENETC PF. 4. Add loopback support for i.MX95 ENETC PF. --- v1 Link: https://lore.kernel.org/imx/20250103060610.2233908-1-wei.fang@nxp.com/ --- Wei Fang (13): net: enetc: add initial netc-lib driver to support NTMP net: enetc: add command BD ring support for i.MX95 ENETC net: enetc: move generic MAC filterng interfaces to enetc-core net: enetc: add MAC filter for i.MX95 ENETC PF net: enetc: add debugfs interface to dump MAC filter net: enetc: make enetc_set_rxfh() and enetc_get_rxfh() reusable net: enetc: add RSS support for i.MX95 ENETC PF net: enetc: enable RSS feature by default net: enetc: move generic VLAN filter interfaces to enetc-core net: enetc: move generic VLAN hash filter functions to enetc_pf_common.c net: enetc: add VLAN filtering support for i.MX95 ENETC PF net: enetc: add loopback support for i.MX95 ENETC PF MAINTAINERS: add new file ntmp.h to ENETC driver MAINTAINERS | 1 + drivers/net/ethernet/freescale/enetc/Kconfig | 11 + drivers/net/ethernet/freescale/enetc/Makefile | 4 + drivers/net/ethernet/freescale/enetc/enetc.c | 103 +++- drivers/net/ethernet/freescale/enetc/enetc.h | 58 +- .../ethernet/freescale/enetc/enetc4_debugfs.c | 93 +++ .../ethernet/freescale/enetc/enetc4_debugfs.h | 20 + .../net/ethernet/freescale/enetc/enetc4_hw.h | 12 + .../net/ethernet/freescale/enetc/enetc4_pf.c | 537 +++++++++++++++++- .../net/ethernet/freescale/enetc/enetc_cbdr.c | 65 ++- .../ethernet/freescale/enetc/enetc_ethtool.c | 71 ++- .../net/ethernet/freescale/enetc/enetc_hw.h | 6 + .../net/ethernet/freescale/enetc/enetc_pf.c | 140 ++--- .../net/ethernet/freescale/enetc/enetc_pf.h | 32 +- .../freescale/enetc/enetc_pf_common.c | 46 +- .../freescale/enetc/enetc_pf_common.h | 2 + .../net/ethernet/freescale/enetc/enetc_vf.c | 19 +- drivers/net/ethernet/freescale/enetc/ntmp.c | 468 +++++++++++++++ .../ethernet/freescale/enetc/ntmp_formats.h | 59 ++ include/linux/fsl/ntmp.h | 178 ++++++ 20 files changed, 1729 insertions(+), 196 deletions(-) create mode 100644 drivers/net/ethernet/freescale/enetc/enetc4_debugfs.c create mode 100644 drivers/net/ethernet/freescale/enetc/enetc4_debugfs.h create mode 100644 drivers/net/ethernet/freescale/enetc/ntmp.c create mode 100644 drivers/net/ethernet/freescale/enetc/ntmp_formats.h create mode 100644 include/linux/fsl/ntmp.h