Skip to contentSkip to conversation

netlink: tsconfig: add HW time stamping configuration

PATCH Applied Vadim Fedorenko 3 participants 3 messages Nov 12, 2025 – Nov 19, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 netlink: tsconfig: add HW time stamping configuration

The kernel supports configuring HW time stamping modes via netlink messages, but previous implementation added support for HW time stamping source configuration. Add support to configure TX/RX time stamping. We keep TX type and RX filter configuration as a bit value, but if we will need multibit value to be set in the future, there is an option to use "rx-filters" keyword which will be mutually exclusive with current "rx-filter" keyword. The same applies to "tx-type".

---
v3 -> v4:
* fix check condition after code style improvements (thanks Kory) v2 -> v3:
* improve code style
v1 -> v2:
* improve commit message

---
 ethtool.8.in       | 12 +++++++-
 ethtool.c          |  1 +
 netlink/tsconfig.c | 77 +++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 88 insertions(+), 2 deletions(-)
ethtool.8.in +11 -1
index 8874ade..1788588 100644
@@ -357,6 +357,10 @@ ethtool \- query or control network driver and hardware settings
 .IR N
 .BI qualifier
 .IR precise|approx ]
+.RB [ tx
+.IR TX-TYPE ]
+.RB [ rx-filter
+.IR RX-FILTER ]
 .HP
 .B ethtool \-x|\-\-show\-rxfh\-indir|\-\-show\-rxfh
 .I devname
@@ -1287,7 +1291,7 @@ for IEEE 1588 quality and "approx" is for NICs DMA point.
 Show the selected time stamping PTP hardware clock configuration.
 .TP
 .B \-\-set\-hwtimestamp\-cfg
-Select the device's time stamping PTP hardware clock.
+Sets the device's time stamping PTP hardware clock configuration.
 .RS 4
 .TP
 .BI index \ N
@@ -1296,6 +1300,12 @@ Index of the ptp hardware clock
 .BI qualifier \ precise | approx
 Qualifier of the ptp hardware clock. Mainly "precise" the default one is
 for IEEE 1588 quality and "approx" is for NICs DMA point.
+.TP
+.BI tx \ TX-TYPE
+Type of TX time stamping to configure
+.TP
+.BI rx-filter \ RX-FILTER
+Type of RX time stamping filter to configure
 .RE
 .TP
 .B \-x \-\-show\-rxfh\-indir \-\-show\-rxfh
ethtool.c +1 -0
index bd45b9e..521e6fe 100644
@@ -6068,6 +6068,7 @@ static const struct option args[] = {
 		.nlfunc	= nl_stsconfig,
 		.help	= "Select hardware time stamping",
 		.xhelp	= "		[ index N qualifier precise|approx ]\n"
+			  "		[ tx TX-TYPE ] [ rx-filter RX-FILTER ]\n"
 	},
 	{
 		.opts	= "-x|--show-rxfh-indir|--show-rxfh",
netlink/tsconfig.c +76 -1

101 lines not on this page · raw message

Signature · 1 line
2.47.3
Reviewed-by on v4 1/1
#1 lore raw
Quoted 7 lines · On Wed, 12 Nov 2025 17:26:00 +0000 Vadim Fedorenko <[email protected]>…

The kernel supports configuring HW time stamping modes via netlink messages, but previous implementation added support for HW time stamping source configuration. Add support to configure TX/RX time stamping. We keep TX type and RX filter configuration as a bit value, but if we will need multibit value to be set in the future, there is an option to use "rx-filters" keyword which will be mutually exclusive with current "rx-filter" keyword. The same applies to "tx-type".

Thank you!

Signature · 3 lines
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
#2 lore raw
In reply to Vadim Fedorenko
This patch was applied to ethtool/ethtool.git (next) by Michal Kubecek <[email protected]>:

Hello:

This patch was applied to ethtool/ethtool.git (next) by Michal Kubecek <[email protected]>:

Quoted 9 lines · On Wed, 12 Nov 2025 17:26:00 +0000 you wrote:

The kernel supports configuring HW time stamping modes via netlink messages, but previous implementation added support for HW time stamping source configuration. Add support to configure TX/RX time stamping. We keep TX type and RX filter configuration as a bit value, but if we will need multibit value to be set in the future, there is an option to use "rx-filters" keyword which will be mutually exclusive with current "rx-filter" keyword. The same applies to "tx-type".

[...]

Here is the summary with links:
- [ethtool-next,v4] netlink: tsconfig: add HW time stamping configuration

    https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=3a14b8c15fce

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html