aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <[email protected]>2021-12-14 12:28:25 +0000
committerDavid S. Miller <[email protected]>2021-12-14 12:28:25 +0000
commitd0c3e46484fb9bafcfb0648da919f91eea7e14cd (patch)
treed0589dd9852ae75573cf70f53e0d920bdeb63eb2 /include
parenta3c62a042237d1adeb0290dcb768e17edd6dcd25 (diff)
parent085d61000845188a9aa9a9524f13a0622a1380d7 (diff)
Merge branch 'hwtstamp_bonding'
Hangbin Liu says: ==================== net: add new hwtstamp flag HWTSTAMP_FLAG_BONDED_PHC_INDEX This patchset add a new hwtstamp_config flag HWTSTAMP_FLAG_BONDED_PHC_INDEX. When user want to get bond active interface's PHC, they need to add this flag and aware the PHC index may changed. v3: Use bitwise test to check the flags validation v2: rename the flag to HWTSTAMP_FLAG_BONDED_PHC_INDEX ==================== Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/net_tstamp.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h
index fcc61c73a666..e258e52cfd1f 100644
--- a/include/uapi/linux/net_tstamp.h
+++ b/include/uapi/linux/net_tstamp.h
@@ -62,7 +62,7 @@ struct so_timestamping {
/**
* struct hwtstamp_config - %SIOCGHWTSTAMP and %SIOCSHWTSTAMP parameter
*
- * @flags: no flags defined right now, must be zero for %SIOCSHWTSTAMP
+ * @flags: one of HWTSTAMP_FLAG_*
* @tx_type: one of HWTSTAMP_TX_*
* @rx_filter: one of HWTSTAMP_FILTER_*
*
@@ -78,6 +78,20 @@ struct hwtstamp_config {
int rx_filter;
};
+/* possible values for hwtstamp_config->flags */
+enum hwtstamp_flags {
+ /*
+ * With this flag, the user could get bond active interface's
+ * PHC index. Note this PHC index is not stable as when there
+ * is a failover, the bond active interface will be changed, so
+ * will be the PHC index.
+ */
+ HWTSTAMP_FLAG_BONDED_PHC_INDEX = (1<<0),
+
+ HWTSTAMP_FLAG_LAST = HWTSTAMP_FLAG_BONDED_PHC_INDEX,
+ HWTSTAMP_FLAG_MASK = (HWTSTAMP_FLAG_LAST - 1) | HWTSTAMP_FLAG_LAST
+};
+
/* possible values for hwtstamp_config->tx_type */
enum hwtstamp_tx_types {
/*