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
38 ETHTOOL_MSG_PAUSE_SET,38 ETHTOOL_MSG_PAUSE_SET,
39 ETHTOOL_MSG_EEE_GET,39 ETHTOOL_MSG_EEE_GET,
40 ETHTOOL_MSG_EEE_SET,40 ETHTOOL_MSG_EEE_SET,
41 ETHTOOL_MSG_TSINFO_GET,
41 42
42 /* add new constants above here */43 /* add new constants above here */
43 __ETHTOOL_MSG_USER_CNT,44 __ETHTOOL_MSG_USER_CNT,
@@ -72,6 +73,7 @@ enum { · 28 unmodified lines
72 ETHTOOL_MSG_PAUSE_NTF,73 ETHTOOL_MSG_PAUSE_NTF,
73 ETHTOOL_MSG_EEE_GET_REPLY,74 ETHTOOL_MSG_EEE_GET_REPLY,
74 ETHTOOL_MSG_EEE_NTF,75 ETHTOOL_MSG_EEE_NTF,
76 ETHTOOL_MSG_TSINFO_GET_REPLY,
75 77
76 /* add new constants above here */78 /* add new constants above here */
77 __ETHTOOL_MSG_KERNEL_CNT,79 __ETHTOOL_MSG_KERNEL_CNT,
@@ -386,6 +388,21 @@ enum { · 308 unmodified lines
386 ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1)388 ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1)
387};389};
388 390
391/* TSINFO */
392
393enum {
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
389/* generic netlink info */406/* generic netlink info */
390#define ETHTOOL_GENL_NAME "ethtool"407#define ETHTOOL_GENL_NAME "ethtool"
391#define ETHTOOL_GENL_VERSION 1408#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