diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a1b0400c8d8..f5aa87e1e0c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1933,6 +1933,36 @@ static inline ktime_t net_invalid_timestamp(void) | |||
1933 | return ktime_set(0, 0); | 1933 | return ktime_set(0, 0); |
1934 | } | 1934 | } |
1935 | 1935 | ||
1936 | extern void skb_timestamping_init(void); | ||
1937 | |||
1938 | #ifdef CONFIG_NETWORK_PHY_TIMESTAMPING | ||
1939 | |||
1940 | extern void skb_clone_tx_timestamp(struct sk_buff *skb); | ||
1941 | extern bool skb_defer_rx_timestamp(struct sk_buff *skb); | ||
1942 | |||
1943 | #else /* CONFIG_NETWORK_PHY_TIMESTAMPING */ | ||
1944 | |||
1945 | static inline void skb_clone_tx_timestamp(struct sk_buff *skb) | ||
1946 | { | ||
1947 | } | ||
1948 | |||
1949 | static inline bool skb_defer_rx_timestamp(struct sk_buff *skb) | ||
1950 | { | ||
1951 | return false; | ||
1952 | } | ||
1953 | |||
1954 | #endif /* !CONFIG_NETWORK_PHY_TIMESTAMPING */ | ||
1955 | |||
1956 | /** | ||
1957 | * skb_complete_tx_timestamp() - deliver cloned skb with tx timestamps | ||
1958 | * | ||
1959 | * @skb: clone of the the original outgoing packet | ||
1960 | * @hwtstamps: hardware time stamps | ||
1961 | * | ||
1962 | */ | ||
1963 | void skb_complete_tx_timestamp(struct sk_buff *skb, | ||
1964 | struct skb_shared_hwtstamps *hwtstamps); | ||
1965 | |||
1936 | /** | 1966 | /** |
1937 | * skb_tstamp_tx - queue clone of skb with send time stamps | 1967 | * skb_tstamp_tx - queue clone of skb with send time stamps |
1938 | * @orig_skb: the original outgoing packet | 1968 | * @orig_skb: the original outgoing packet |
@@ -1965,6 +1995,7 @@ static inline void sw_tx_timestamp(struct sk_buff *skb) | |||
1965 | */ | 1995 | */ |
1966 | static inline void skb_tx_timestamp(struct sk_buff *skb) | 1996 | static inline void skb_tx_timestamp(struct sk_buff *skb) |
1967 | { | 1997 | { |
1998 | skb_clone_tx_timestamp(skb); | ||
1968 | sw_tx_timestamp(skb); | 1999 | sw_tx_timestamp(skb); |
1969 | } | 2000 | } |
1970 | 2001 | ||