From: Jakub Kicinski <kuba@kernel.org>
To: Kory Maincent <kory.maincent@bootlin.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Donald Hunter <donald.hunter@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Jason Xing <kernelxing@tencent.com>,
Richard Cochran <richardcochran@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
"Russell King (Oracle)" <linux@armlinux.org.uk>
Subject: Re: [PATCH net-next v2] net: Add support for providing the PTP hardware source in tsinfo
Date: Thu, 8 May 2025 19:36:45 -0700 [thread overview]
Message-ID: <20250508193645.78e1e4d9@kernel.org> (raw)
In-Reply-To: <20250506-feature_ptp_source-v2-1-dec1c3181a7e@bootlin.com>
On Tue, 06 May 2025 14:18:45 +0200 Kory Maincent wrote:
> + -
> + name: ts-hwtstamp-source
> + enum-name: hwtstamp-source
> + header: linux/ethtool.h
> + type: enum
> + name-prefix: hwtstamp-source
> + entries: [ netdev, phylib ]
You're missing value: 1, you should let YNL generate this to avoid
the discrepancies.
diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml
index 20c6b2bf5def..3e2f470fb213 100644
--- a/Documentation/netlink/specs/ethtool.yaml
+++ b/Documentation/netlink/specs/ethtool.yaml
@@ -99,12 +99,21 @@ uapi-header: linux/ethtool_netlink_generated.h
type: enum
entries: [ unknown, disabled, enabled ]
-
- name: ts-hwtstamp-source
- enum-name: hwtstamp-source
- header: linux/ethtool.h
+ name: hwtstamp-source
+ name-prefix: hwtstamp-source-
type: enum
- name-prefix: hwtstamp-source
- entries: [ netdev, phylib ]
+ entries:
+ -
+ name: netdev
+ doc: |
+ Hardware timestamp comes from a MAC or a device
+ which has MAC and PHY integrated
+ value: 1
+ -
+ name: phylib
+ doc: |
+ Hardware timestamp comes from one PHY device
+ of the network topology
attribute-sets:
-
@@ -906,7 +915,7 @@ uapi-header: linux/ethtool_netlink_generated.h
-
name: hwtstamp-source
type: u32
- enum: ts-hwtstamp-source
+ enum: hwtstamp-source
-
name: hwtstamp-phyindex
type: u32
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 1d886682b4b5..84833cca29fe 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1730,18 +1730,6 @@ struct ethtool_ts_info {
__u32 rx_reserved[3];
};
-/**
- * enum hwtstamp_source - Source of the hardware timestamp
- * @HWTSTAMP_SOURCE_NETDEV: Hardware timestamp comes from a MAC or a device
- * which has MAC and PHY integrated
- * @HWTSTAMP_SOURCE_PHYLIB: Hardware timestamp comes from one PHY device
- * of the network topology
- */
-enum hwtstamp_source {
- HWTSTAMP_SOURCE_NETDEV = 1,
- HWTSTAMP_SOURCE_PHYLIB,
-};
-
/*
* %ETHTOOL_SFEATURES changes features present in features[].valid to the
* values of corresponding bits in features[].requested. Bits in .requested
diff --git a/include/uapi/linux/ethtool_netlink_generated.h b/include/uapi/linux/ethtool_netlink_generated.h
index 7cbcf44d0a32..6181211bb3f5 100644
--- a/include/uapi/linux/ethtool_netlink_generated.h
+++ b/include/uapi/linux/ethtool_netlink_generated.h
@@ -37,6 +37,18 @@ enum ethtool_tcp_data_split {
ETHTOOL_TCP_DATA_SPLIT_ENABLED,
};
+/**
+ * enum ethtool_hwtstamp_source
+ * @HWTSTAMP_SOURCE_NETDEV: Hardware timestamp comes from a MAC or a device
+ * which has MAC and PHY integrated
+ * @HWTSTAMP_SOURCE_PHYLIB: Hardware timestamp comes from one PHY device of the
+ * network topology
+ */
+enum ethtool_hwtstamp_source {
+ HWTSTAMP_SOURCE_NETDEV = 1,
+ HWTSTAMP_SOURCE_PHYLIB,
+};
+
enum {
ETHTOOL_A_HEADER_UNSPEC,
ETHTOOL_A_HEADER_DEV_INDEX,
next prev parent reply other threads:[~2025-05-09 2:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 12:18 [PATCH net-next v2] net: Add support for providing the PTP hardware source in tsinfo Kory Maincent
2025-05-09 2:36 ` Jakub Kicinski [this message]
2025-05-12 8:19 ` Kory Maincent
2025-05-12 23:57 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250508193645.78e1e4d9@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kernelxing@tencent.com \
--cc=kory.maincent@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).