From patchwork Thu Jan 16 10:46:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13941567 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2048.outbound.protection.outlook.com [40.107.103.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB76F1DE2DF for ; Thu, 16 Jan 2025 10:46:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.48 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737024412; cv=fail; b=ubopdkfCU/0tWV3y7tbGpFeyO+VGARFLBY+XryK2f/F1NU4YcDMONG67+OBv8D6bJIXBdc/OQAXOkLcS3Qb+tV7SDGzQzUhL0cZsFheJW8ZE/2+ZQl5yVq3takDS6h6tVLuEWZ7o9e8wu8+PeN2Y0yKAXDNmb1PekjAFATxs5AA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737024412; c=relaxed/simple; bh=IHA8fp4Q4gV/MIhj+R35cm6aFt+NwEdVCzjfSkMlfhA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=uEvaof42mfIPMxdjgo5ay8Fdrxdm/fe2Au/JRyxQn/zMIm8CgBm2h7w7A2k8m28MxtxMiuzdTH1xl8Zh4qIVyp0WqlBsaEflhJDKY44tBWzOJP76XhnPiu6wDK9qIQOo0i44sLKPXIyxfg2UPhwMBf3YTVaomaYdmksFXQ9P5tI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=niW6nHke; arc=fail smtp.client-ip=40.107.103.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="niW6nHke" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YMZ+nSJjWgqajrJrwzh7cTJsqzcJ6eyMTyMOIInhXuf2goNISnjO3zej5LYeagvYzLNQ9xCgvDNHdJ2hycFJat/Z6dcMgLlw6n7svPD7yhocdLcbBBUNuayHZNShFdzobnU2b/gdDjsOIfBPl5IREgWGYqur4/LLFWq3+W2hds5fAXUbtIASUJfPV0oCCj2LhLVhu2LsEnpVk/XkvHAGyEzLbMzq5/0/z3bO83JmCOy57qQaT7tGaPWOhD+nGpOQe3cZwJqfQviU7kN1THTsICl6AwaRgriMHfbvMHmty9BNJQ40dFlmgxpnUeI0U3g5Rj4rlmFaPieOQizgGGR0EQ== 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=bbfSZfFsWDu/8wKhUUuOt9WHsnnWhpVMhVScY+sz1q4=; b=mhs2+OaA/H5mPJEZC205dSiV3pgdjoeRmLVsVy1F6eYO3fKuRWf/89h34BL3g919PRpGmqxOvNf21JKny3FK9ithE3Ks2xe0LI9G1a8gN7sXNqT4z6QPjL8HHbZnXqd1B/GxUY4k1Sm/g0Dfmu3wZAHqfKCod0e+n2OX56ShB7bmT2xMaF8K6fkn+4mHqeBreyPz07NPVH8l6/IGg/5ecHpLcqD/pVjvvvuJDeR3iwI81SMFxQQh1JUtC7uF8ZGO3vDxXdqOVpUVWVupgqBVPkl6ZJCbWJSL+XUod8ckwXv0KxL5tEpmjtNJz++wBBHVnrWSkmD8o8RkUn6rs/IMQw== 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=bbfSZfFsWDu/8wKhUUuOt9WHsnnWhpVMhVScY+sz1q4=; b=niW6nHkezFLTuqJKkBIEMAQcDYNxjVFo9Aa6Zjmg6zLOQUyh4DdsucH+OnEKP+lzjVsGGHbJjVMqB4zFfx8QM++7xx49ghCgeQq/oNorr5gDDQgLEMaxFJWyMR4LkfkmvcH+chwnzfaR9hMoALkf8axN7A94lOzB1GHcaribZ+HjWoU4fKVewv6i7lAdpyDqD9/QYZYsGsi458o5SnPxQzmJ3s5KhriUtpS7A8JEf8mKd3r04CWcc3VURLtcDgBFrWea0c8bGVrKEVLDRC8GqiEJEE+ubrwoETaeWCvxJcFMKFuz6p5/gpoX7njzFqDgAIm4d2/c2OspWnTOeFOtIQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM8PR04MB7779.eurprd04.prod.outlook.com (2603:10a6:20b:24b::14) by DB9PR04MB9675.eurprd04.prod.outlook.com (2603:10a6:10:307::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.14; Thu, 16 Jan 2025 10:46:48 +0000 Received: from AM8PR04MB7779.eurprd04.prod.outlook.com ([fe80::7417:d17f:8d97:44d2]) by AM8PR04MB7779.eurprd04.prod.outlook.com ([fe80::7417:d17f:8d97:44d2%6]) with mapi id 15.20.8356.010; Thu, 16 Jan 2025 10:46:47 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Claudiu Manoil , Alexandre Belloni , Horatiu Vultur , Daniel Machon , UNGLinuxDriver@microchip.com, Xiaoliang Yang , Yangbo Lu , Richard Cochran Subject: [PATCH v2 net-next 4/4] net: dsa: felix: report timestamping stats from the ocelot library Date: Thu, 16 Jan 2025 12:46:28 +0200 Message-ID: <20250116104628.123555-5-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250116104628.123555-1-vladimir.oltean@nxp.com> References: <20250116104628.123555-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: VI1PR04CA0136.eurprd04.prod.outlook.com (2603:10a6:803:f0::34) To AM8PR04MB7779.eurprd04.prod.outlook.com (2603:10a6:20b:24b::14) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM8PR04MB7779:EE_|DB9PR04MB9675:EE_ X-MS-Office365-Filtering-Correlation-Id: a9590bc9-1576-4b66-1982-08dd361b1371 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: sFTCjvUoBjAAJLBinJEySafGfwYi9W9BhQGcZ8LMrUsXDorJT7bFv2QgQMBKS/QNNw9gkzIX+zsqdcLABjG7FEeY+nT7Iu/fcyzi3NILYh68LjNCpJYkA4sNp/6sxk+r3YYLfL4MXeA+g6ZmwQGXE0W8NJTIdOYV8tzFl7Wn20zF5cFLPlIQC6mFLJDopRt5O0BCj7kJFMKfYv8drNvPG6J8bc020iCWRTcpym6TS8YLnsE2lnRUPQoFfUqIv9MiGBEWwGUGg+bdShYQa9ULzw+/WT6gO+m+i//SEEk1XIVpkxvdOAQ5Y0AnbZ9t6uDko0LaswqKqg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vREP/y4REBzCjiG+aU5keysh21QQktkvg2flXu20xhRSyGyx21yZK1lh93TXUwhPG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8PR04MB7779.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: dhHFNbbQNSoOSBmBRnZxtq+CvkI/iIi2fa98zV+xbbkcd3pknuV5aI2vUY1JKpEdC2NrTUwFJ/67P6N8gduMzt2G1kx30tYC9wmJFCZYiaO7KE2X7QnrfJbYyV7ruhH6+pxdVPS+ZpOu8DMnFgDjLWRQPDkl+VCxVzn03xPioM1UWg/Zv9Nwgqm7tDXI/moVaN5kQLkEP0G3Sdf1O9L9GsZBHRvfYVJYRQLO8QjIL/nuDt+lV5vq9EapQtMHUEugVpYySKuOSaDRaeytvFW0v7fudKn2rhacyDnstNrQWvuDwnD/ErGajrhTvarUR5DtDKffaqjBgZw/AgmXtBfazkfZ6l84Vma2dJCnqY1k+pibuVPNY5figWJTChiHzmBk+UjCyQEVUYKUcASw/CCEKHoYB6v5QloH4lpyqUppl4KCO93kBH2DJrRWefebZWMk3BVsx1/0Jv2ATUmlQex1NfqU1SO+9lzuA6chi1h0O+vxkud5ULtUNa1NSWn8o/Zn2ptskrHSrVTCNtoUCGbZ7mvpuaeQTztn47mKXWSnhUv8X0kun/kTN43L3Iuqz5VJG+kR0w2+UEHbO6wz//zDB0lEYJqgm0q08dVL5oFwZyC1YFaPaR+fNMOScSXukValgJWCvrhF67pR2cJLU8JlTpd5xUqz0+D/faJ5kqPTMK8rdzDiKR8nhdr2/BJnyBRPXJwchas48THCZC+9H76iUoX/i54ARjg8qS0lA/1OU5tP2taLYlVJGfDYVv4R5eOZN7qfPQuYWWLRD/eWDt1sPVzR/zxoWK7XH+b2WvR+mrOe8BYV0p8M7QmA1FpVGQYLO+QCHSyJBrr4fGyVIiEeP4UpAiPCzq8Gmfado2I3pYduzeag5KrJLeXDHTDl56iGNRn6GzccExA/9+Twmjb2mKhL0TEkU/yc1RfxcpdXVlOg1xXfuJkdZVwc3kPZFFVKy9QUPpMN2UF8dLR28TskgQI+sIwQGBaS2wlumIay2Z9Xz934pO4gsh/nZ6hgQQO6VpcL8KooTgZHe7vXvTSXHvcUrg09n8Q5cCkl1NzTCZXdWzIxV47iv6tA0T+gHD0fCJUc8LlE2II2kCWBHC1VNl4/nCT+YtZBz7TKO1BdFBG40mJKhmDszrWnscvNRF9tVXiyAALv2EvNlxQneEAUAwhnrLJ/asKBjAUB3ijIlQ8RCu80dvHiX+Ek/DzihDvdyTFdrJ+UzeRLt7fu4vaQyQ2Jpzu9P6Fk9Sp+V3p8mlibbjaG41oXndUPfc//GuB5KQ1BDjtgVam5XhNtaML8iGK6ckz83sEpkPHP0/9AHV1qbvHW43PyB4u2bGGyze0MAcq7X8TrLXmNUFpnBuYnYZLEGKHLdczgkyud6KzJaMATPcnz+mG6L1FqsFItt6RRUSrIs0PFn1tmhGg7oaDLSHsqFZlGjIdzfLRZIMhBCGgbElnN5TMompZVt+nJHfJXZXpUgy6t2iBp3Dxw9ARvbvgMDPrM+f8ByR0c19UylqQqj6SNv0hhYjLiMXSGsgk/arqFWzV2acPdjhUUq+lLMRucSqPTHlvnap6zs2hA/WVToS0wflK6QJXgfoKXgnm1/S5AWRfuwYPrYvna2gRfTw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9590bc9-1576-4b66-1982-08dd361b1371 X-MS-Exchange-CrossTenant-AuthSource: AM8PR04MB7779.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2025 10:46:47.6160 (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: p2H2DKmgcVQM58bniQYgeoaO2YyE4xD0vA3TB25kQsR2L8JPiZaazDOnVMBEaKOEQT605OlZyB7t1x/b1H6Drg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9675 X-Patchwork-Delegate: kuba@kernel.org Make the linkage between the DSA user port ethtool_ops :: get_ts_info and the implementation from the Ocelot switch library. Signed-off-by: Vladimir Oltean Reviewed-by: Jakub Kicinski --- v1->v2: none drivers/net/dsa/ocelot/felix.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index 3aa9c997018a..0a4e682a55ef 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -1316,6 +1316,14 @@ static void felix_get_eth_phy_stats(struct dsa_switch *ds, int port, ocelot_port_get_eth_phy_stats(ocelot, port, phy_stats); } +static void felix_get_ts_stats(struct dsa_switch *ds, int port, + struct ethtool_ts_stats *ts_stats) +{ + struct ocelot *ocelot = ds->priv; + + ocelot_port_get_ts_stats(ocelot, port, ts_stats); +} + static void felix_get_strings(struct dsa_switch *ds, int port, u32 stringset, u8 *data) { @@ -2237,6 +2245,7 @@ static const struct dsa_switch_ops felix_switch_ops = { .get_stats64 = felix_get_stats64, .get_pause_stats = felix_get_pause_stats, .get_rmon_stats = felix_get_rmon_stats, + .get_ts_stats = felix_get_ts_stats, .get_eth_ctrl_stats = felix_get_eth_ctrl_stats, .get_eth_mac_stats = felix_get_eth_mac_stats, .get_eth_phy_stats = felix_get_eth_phy_stats,