[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA3PR11MB8986B14D3CF3047845BD9926E525A@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Tue, 29 Jul 2025 11:16:27 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: "Kubalewski, Arkadiusz" <arkadiusz.kubalewski@...el.com>, "Nguyen, Anthony
L" <anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>, "andrew+netdev@...n.ch"
<andrew+netdev@...n.ch>, "davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>, "kuba@...nel.org"
<kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"horms@...nel.org" <horms@...nel.org>, "sdf@...ichev.me" <sdf@...ichev.me>,
"almasrymina@...gle.com" <almasrymina@...gle.com>, "asml.silence@...il.com"
<asml.silence@...il.com>, "leitao@...ian.org" <leitao@...ian.org>,
"kuniyu@...gle.com" <kuniyu@...gle.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Kubalewski, Arkadiusz"
<arkadiusz.kubalewski@...el.com>
Subject: RE: [Intel-wired-lan] [RFC PATCH] net: add net-device TX clock source
selection framework
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Arkadiusz Kubalewski
> Sent: Tuesday, July 29, 2025 12:45 PM
> To: Nguyen, Anthony L <anthony.l.nguyen@...el.com>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@...el.com>; andrew+netdev@...n.ch;
> davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org;
> pabeni@...hat.com; horms@...nel.org; sdf@...ichev.me;
> almasrymina@...gle.com; asml.silence@...il.com; leitao@...ian.org;
> kuniyu@...gle.com
> Cc: linux-kernel@...r.kernel.org; intel-wired-lan@...ts.osuosl.org;
> netdev@...r.kernel.org; Kubalewski, Arkadiusz
> <arkadiusz.kubalewski@...el.com>
> Subject: [Intel-wired-lan] [RFC PATCH] net: add net-device TX clock
> source selection framework
>
> Add support for user-space control over network device transmit clock
> sources through a new sysfs interface.
> A network device may support multiple TX clock sources (OCXO, SyncE
> reference, external reference clocks) which are critical for time-
> sensitive networking applications and synchronization protocols.
>
> This patch introduces:
>
> 1. Core TX clock framework (net/core/tx_clk.c):
> - per net-device clock source registration and management
> - sysfs interface under /sys/class/net/<device>/tx_clk/
> - thread-safe clock switching by using mutex locking
>
> 2. Generic netdev integration:
> - new netdev_tx_clk_ops structure for driver callbacks
> - TX clock list and kobject directory in struct net_device
> - registration/cleanup functions for driver use
>
> 3. Intel ICE driver implementation:
> - support for E825 series network cards
> - three clock sources: OCXO (default), SyncE_ref, ext_ref
> - per-PF clock state management
>
> 4. Kconfig option NET_TX_CLK:
> - optional feature + user documentation
>
> User interface:
> - Read /sys/class/net/<device>/tx_clk/<clock_name> to get status (0/1)
> - Write "1" to switch to that clock source
> - Writing "0" is not supported (one clock must always be active)
>
> Example usage:
> # Check current clock status
> $ cat /sys/class/net/eth0/tx_clk/*
>
> # Switch to external reference clock
> $ echo 1 > /sys/class/net/eth0/tx_clk/ext_ref
>
> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>
> ---
...
> a/drivers/net/ethernet/intel/ice/ice_tx_clk.c
> b/drivers/net/ethernet/intel/ice/ice_tx_clk.c
> new file mode 100644
> index 000000000000..121e9fa0c146
> --- /dev/null
> +++ b/drivers/net/ethernet/intel/ice/ice_tx_clk.c
> @@ -0,0 +1,113 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/* Copyright (C) 2025, Intel Corporation. */
> +
...
> +++ b/net/core/tx_clk.c
> @@ -0,0 +1,150 @@
> +// SPDX-License-Identifier: GPL-2.0
I prefer old style /* SPDX-License-Identifier: GPL-2.0 */
Everything else is fine for me.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
...
> +EXPORT_SYMBOL_GPL(netdev_tx_clk_cleanup);
> |
> base-commit: fa582ca7e187a15e772e6a72fe035f649b387a60
> --
> 2.38.1
Powered by blists - more mailing lists