@@ -237,6 +237,8 @@ Userspace to kernel:
237237 ``ETHTOOL_MSG_MM_SET `` set MAC merge layer parameters
238238 ``ETHTOOL_MSG_MODULE_FW_FLASH_ACT `` flash transceiver module firmware
239239 ``ETHTOOL_MSG_PHY_GET `` get Ethernet PHY information
240+ ``ETHTOOL_MSG_TSCONFIG_GET `` get hw timestamping configuration
241+ ``ETHTOOL_MSG_TSCONFIG_SET `` set hw timestamping configuration
240242 ===================================== =================================
241243
242244Kernel to userspace:
@@ -286,6 +288,8 @@ Kernel to userspace:
286288 ``ETHTOOL_MSG_MODULE_FW_FLASH_NTF `` transceiver module flash updates
287289 ``ETHTOOL_MSG_PHY_GET_REPLY `` Ethernet PHY information
288290 ``ETHTOOL_MSG_PHY_NTF `` Ethernet PHY information change
291+ ``ETHTOOL_MSG_TSCONFIG_GET_REPLY `` hw timestamping configuration
292+ ``ETHTOOL_MSG_TSCONFIG_SET_REPLY `` new hw timestamping configuration
289293 ======================================== =================================
290294
291295``GET `` requests are sent by userspace applications to retrieve device
@@ -2244,6 +2248,75 @@ Kernel response contents:
22442248When ``ETHTOOL_A_PHY_UPSTREAM_TYPE `` is PHY_UPSTREAM_PHY, the PHY's parent is
22452249another PHY.
22462250
2251+ TSCONFIG_GET
2252+ ============
2253+
2254+ Retrieves the information about the current hardware timestamping source and
2255+ configuration.
2256+
2257+ It is similar to the deprecated ``SIOCGHWTSTAMP `` ioctl request.
2258+
2259+ Request contents:
2260+
2261+ ==================================== ====== ==========================
2262+ ``ETHTOOL_A_TSCONFIG_HEADER `` nested request header
2263+ ==================================== ====== ==========================
2264+
2265+ Kernel response contents:
2266+
2267+ ======================================== ====== ============================
2268+ ``ETHTOOL_A_TSCONFIG_HEADER `` nested request header
2269+ ``ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER `` nested PTP hw clock provider
2270+ ``ETHTOOL_A_TSCONFIG_TX_TYPES `` bitset hwtstamp Tx type
2271+ ``ETHTOOL_A_TSCONFIG_RX_FILTERS `` bitset hwtstamp Rx filter
2272+ ``ETHTOOL_A_TSCONFIG_HWTSTAMP_FLAGS `` u32 hwtstamp flags
2273+ ======================================== ====== ============================
2274+
2275+ When set the ``ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER `` attribute identifies the
2276+ source of the hw timestamping provider. It is composed by
2277+ ``ETHTOOL_A_TS_HWTSTAMP_PROVIDER_INDEX `` attribute which describe the index of
2278+ the PTP device and ``ETHTOOL_A_TS_HWTSTAMP_PROVIDER_QUALIFIER `` which describe
2279+ the qualifier of the timestamp.
2280+
2281+ When set the ``ETHTOOL_A_TSCONFIG_TX_TYPES ``, ``ETHTOOL_A_TSCONFIG_RX_FILTERS ``
2282+ and the ``ETHTOOL_A_TSCONFIG_HWTSTAMP_FLAGS `` attributes identify the Tx
2283+ type, the Rx filter and the flags configured for the current hw timestamping
2284+ provider. The attributes are propagated to the driver through the following
2285+ structure:
2286+
2287+ .. kernel-doc :: include/linux/net_tstamp.h
2288+ :identifiers: kernel_hwtstamp_config
2289+
2290+ TSCONFIG_SET
2291+ ============
2292+
2293+ Set the information about the current hardware timestamping source and
2294+ configuration.
2295+
2296+ It is similar to the deprecated ``SIOCSHWTSTAMP `` ioctl request.
2297+
2298+ Request contents:
2299+
2300+ ======================================== ====== ============================
2301+ ``ETHTOOL_A_TSCONFIG_HEADER `` nested request header
2302+ ``ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER `` nested PTP hw clock provider
2303+ ``ETHTOOL_A_TSCONFIG_TX_TYPES `` bitset hwtstamp Tx type
2304+ ``ETHTOOL_A_TSCONFIG_RX_FILTERS `` bitset hwtstamp Rx filter
2305+ ``ETHTOOL_A_TSCONFIG_HWTSTAMP_FLAGS `` u32 hwtstamp flags
2306+ ======================================== ====== ============================
2307+
2308+ Kernel response contents:
2309+
2310+ ======================================== ====== ============================
2311+ ``ETHTOOL_A_TSCONFIG_HEADER `` nested request header
2312+ ``ETHTOOL_A_TSCONFIG_HWTSTAMP_PROVIDER `` nested PTP hw clock provider
2313+ ``ETHTOOL_A_TSCONFIG_TX_TYPES `` bitset hwtstamp Tx type
2314+ ``ETHTOOL_A_TSCONFIG_RX_FILTERS `` bitset hwtstamp Rx filter
2315+ ``ETHTOOL_A_TSCONFIG_HWTSTAMP_FLAGS `` u32 hwtstamp flags
2316+ ======================================== ====== ============================
2317+
2318+ For a description of each attribute, see ``TSCONFIG_GET ``.
2319+
22472320Request translation
22482321===================
22492322
@@ -2352,4 +2425,6 @@ are netlink only.
23522425 n/a ``ETHTOOL_MSG_MM_SET ``
23532426 n/a ``ETHTOOL_MSG_MODULE_FW_FLASH_ACT ``
23542427 n/a ``ETHTOOL_MSG_PHY_GET ``
2428+ ``SIOCGHWTSTAMP `` ``ETHTOOL_MSG_TSCONFIG_GET ``
2429+ ``SIOCSHWTSTAMP `` ``ETHTOOL_MSG_TSCONFIG_SET ``
23552430 =================================== =====================================
0 commit comments