From 7e5f6c669cae70a57e7dd6f16e89724ecf872247 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sat, 17 Jul 2010 08:48:28 +0000 Subject: [PATCH] --- yaml --- r: 203623 b: refs/heads/master c: 4507a71507d4ff37e9a499c4241b7701ed1feab4 h: refs/heads/master i: 203621: bf843ca26b2aa8ad4029dbb794a82a6b601d8883 203619: 67e941f4a76143302baab9b2391ebf7f1d4add7a 203615: 656159f5cb24671af38ea246334c0e64b3def5f2 v: v3 --- [refs] | 2 +- trunk/include/linux/skbuff.h | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9d458a52d981..91eaec9f62b7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ad1afb00393915a51c21b1ae8704562bf036855f +refs/heads/master: 4507a71507d4ff37e9a499c4241b7701ed1feab4 diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index ac74ee085d74..a1b0400c8d86 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -1947,6 +1947,27 @@ static inline ktime_t net_invalid_timestamp(void) extern void skb_tstamp_tx(struct sk_buff *orig_skb, struct skb_shared_hwtstamps *hwtstamps); +static inline void sw_tx_timestamp(struct sk_buff *skb) +{ + union skb_shared_tx *shtx = skb_tx(skb); + if (shtx->software && !shtx->in_progress) + skb_tstamp_tx(skb, NULL); +} + +/** + * skb_tx_timestamp() - Driver hook for transmit timestamping + * + * Ethernet MAC Drivers should call this function in their hard_xmit() + * function as soon as possible after giving the sk_buff to the MAC + * hardware, but before freeing the sk_buff. + * + * @skb: A socket buffer. + */ +static inline void skb_tx_timestamp(struct sk_buff *skb) +{ + sw_tx_timestamp(skb); +} + extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len); extern __sum16 __skb_checksum_complete(struct sk_buff *skb);