History

net: ethtool: Add a command to expose current time stamping layer

Time stamping on network packets may happen either in the MAC or in the PHY, but not both. In preparation for making the choice selectable, expose both the current layers via ethtool. In accordance with the kernel implementation as it stands, the current layer will always read as "phy" when a PHY time stamping device is present. Future patches will allow changing the current layer administratively.

Kory Maincent committed 3 years ago

Commit 11d55be1 parent acec05f8 files · +149 −1Browse files

Showing the changes to include/uapi (2 of 8 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/ethtool_netlink.h +14 −0
  2. include/uapi/linux/net_tstamp.h +10 −0
include/uapi/linux/ethtool_netlink.h+14−0
@@ -57,6 +57,7 @@ enum { · 56 unmodified lines
57 ETHTOOL_MSG_PLCA_GET_STATUS,57 ETHTOOL_MSG_PLCA_GET_STATUS,
58 ETHTOOL_MSG_MM_GET,58 ETHTOOL_MSG_MM_GET,
59 ETHTOOL_MSG_MM_SET,59 ETHTOOL_MSG_MM_SET,
60 ETHTOOL_MSG_TS_GET,
60 61
61 /* add new constants above here */62 /* add new constants above here */
62 __ETHTOOL_MSG_USER_CNT,63 __ETHTOOL_MSG_USER_CNT,
@@ -109,6 +110,7 @@ enum { · 46 unmodified lines
109 ETHTOOL_MSG_PLCA_NTF,110 ETHTOOL_MSG_PLCA_NTF,
110 ETHTOOL_MSG_MM_GET_REPLY,111 ETHTOOL_MSG_MM_GET_REPLY,
111 ETHTOOL_MSG_MM_NTF,112 ETHTOOL_MSG_MM_NTF,
113 ETHTOOL_MSG_TS_GET_REPLY,
112 114
113 /* add new constants above here */115 /* add new constants above here */
114 __ETHTOOL_MSG_KERNEL_CNT,116 __ETHTOOL_MSG_KERNEL_CNT,
@@ -975,6 +977,18 @@ enum { · 860 unmodified lines
975 ETHTOOL_A_MM_MAX = (__ETHTOOL_A_MM_CNT - 1)977 ETHTOOL_A_MM_MAX = (__ETHTOOL_A_MM_CNT - 1)
976};978};
977 979
980/* TS LAYER */
981
982enum {
983 ETHTOOL_A_TS_UNSPEC,
984 ETHTOOL_A_TS_HEADER, /* nest - _A_HEADER_* */
985 ETHTOOL_A_TS_LAYER, /* u32 */
986
987 /* add new constants above here */
988 __ETHTOOL_A_TS_CNT,
989 ETHTOOL_A_TS_MAX = (__ETHTOOL_A_TS_CNT - 1)
990};
991
978/* generic netlink info */992/* generic netlink info */
979#define ETHTOOL_GENL_NAME "ethtool"993#define ETHTOOL_GENL_NAME "ethtool"
980#define ETHTOOL_GENL_VERSION 1994#define ETHTOOL_GENL_VERSION 1
include/uapi/linux/net_tstamp.h+10−0
@@ -13,6 +13,16 @@ · 12 unmodified lines
13#include <linux/types.h>13#include <linux/types.h>
14#include <linux/socket.h> /* for SO_TIMESTAMPING */14#include <linux/socket.h> /* for SO_TIMESTAMPING */
15 15
16/* Layer of the TIMESTAMPING provider */
17enum timestamping_layer {
18 NO_TIMESTAMPING,
19 SOFTWARE_TIMESTAMPING,
20 MAC_TIMESTAMPING,
21 PHY_TIMESTAMPING,
22
23 __TIMESTAMPING_COUNT,
24};
25
16/* SO_TIMESTAMPING flags */26/* SO_TIMESTAMPING flags */
17enum {27enum {
18 SOF_TIMESTAMPING_TX_HARDWARE = (1<<0),28 SOF_TIMESTAMPING_TX_HARDWARE = (1<<0),

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