History

net: Add support for providing the PTP hardware source in tsinfo

Multi-PTP source support within a network topology has been merged, but the hardware timestamp source is not yet exposed to users. Currently, users only see the PTP index, which does not indicate whether the timestamp comes from a PHY or a MAC. Add support for reporting the hwtstamp source using a hwtstamp-source field, alongside hwtstamp-phyindex, to describe the origin of the hardware timestamp. Remove HWTSTAMP_SOURCE_UNSPEC enum value as it is not used at all.

Kory Maincent committed 1 year ago

Commit 4ff4d861 parent 3da895b6 files · +94 −11Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/linux/ethtool_netlink_generated.h+14−0
@@ -37,6 +37,18 @@ enum ethtool_tcp_data_split { · 36 unmodified lines
3737 ETHTOOL_TCP_DATA_SPLIT_ENABLED,
3838 };
3939
40+/**
41+ * enum hwtstamp_source - Source of the hardware timestamp
42+ * @HWTSTAMP_SOURCE_NETDEV: Hardware timestamp comes from a MAC or a device
43+ * which has MAC and PHY integrated
44+ * @HWTSTAMP_SOURCE_PHYLIB: Hardware timestamp comes from one PHY device of the
45+ * network topology
46+ */
47+enum hwtstamp_source {
48+ HWTSTAMP_SOURCE_NETDEV = 1,
49+ HWTSTAMP_SOURCE_PHYLIB,
50+};
51+
4052 enum {
4153 ETHTOOL_A_HEADER_UNSPEC,
4254 ETHTOOL_A_HEADER_DEV_INDEX,
@@ -401,6 +413,8 @@ enum { · 358 unmodified lines
401413 ETHTOOL_A_TSINFO_PHC_INDEX,
402414 ETHTOOL_A_TSINFO_STATS,
403415 ETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER,
416+ ETHTOOL_A_TSINFO_HWTSTAMP_SOURCE,
417+ ETHTOOL_A_TSINFO_HWTSTAMP_PHYINDEX,
404418
405419 __ETHTOOL_A_TSINFO_CNT,
406420 ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1)