History

ethtool: provide timestamping information with TSINFO_GET request

Implement TSINFO_GET request to get timestamping information for a network device. This is traditionally available via ETHTOOL_GET_TS_INFO ioctl request. Move part of ethtool_get_ts_info() into common.c so that ioctl and netlink code use the same logic to get timestamping information from the device. v3: use "TSINFO" rather than "TIMESTAMP", suggested by Richard Cochran

Michal Kubecek committed 6 years ago

Commit 5b071c51 parent f76510b9 files · +225 −21Browse files

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

Unified · Split

include/uapi/linux/ethtool_netlink.h+17−0
@@ -38,6 +38,7 @@ enum { · 37 unmodified lines
3838 ETHTOOL_MSG_PAUSE_SET,
3939 ETHTOOL_MSG_EEE_GET,
4040 ETHTOOL_MSG_EEE_SET,
41+ ETHTOOL_MSG_TSINFO_GET,
4142
4243 /* add new constants above here */
4344 __ETHTOOL_MSG_USER_CNT,
@@ -72,6 +73,7 @@ enum { · 28 unmodified lines
7273 ETHTOOL_MSG_PAUSE_NTF,
7374 ETHTOOL_MSG_EEE_GET_REPLY,
7475 ETHTOOL_MSG_EEE_NTF,
76+ ETHTOOL_MSG_TSINFO_GET_REPLY,
7577
7678 /* add new constants above here */
7779 __ETHTOOL_MSG_KERNEL_CNT,
@@ -386,6 +388,21 @@ enum { · 308 unmodified lines
386388 ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1)
387389 };
388390
391+/* TSINFO */
392+
393+enum {
394+ ETHTOOL_A_TSINFO_UNSPEC,
395+ ETHTOOL_A_TSINFO_HEADER, /* nest - _A_HEADER_* */
396+ ETHTOOL_A_TSINFO_TIMESTAMPING, /* bitset */
397+ ETHTOOL_A_TSINFO_TX_TYPES, /* bitset */
398+ ETHTOOL_A_TSINFO_RX_FILTERS, /* bitset */
399+ ETHTOOL_A_TSINFO_PHC_INDEX, /* u32 */
400+
401+ /* add new constants above here */
402+ __ETHTOOL_A_TSINFO_CNT,
403+ ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1)
404+};
405+
389406 /* generic netlink info */
390407 #define ETHTOOL_GENL_NAME "ethtool"
391408 #define ETHTOOL_GENL_VERSION 1

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t