summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2015-10-16 21:57:45 -0700
committerDavid S. Miller <davem@davemloft.net>2015-10-21 07:00:46 -0700
commit625a5e109a3ed6f36a1008a43069a3462b44a424 (patch)
treee626cdaf27202ae8e666f7842da91b64ea940469
parent77c631273dc1305a89698929decafa6e43bea645 (diff)
downloadtalos-obmc-linux-625a5e109a3ed6f36a1008a43069a3462b44a424.tar.gz
talos-obmc-linux-625a5e109a3ed6f36a1008a43069a3462b44a424.zip
tcp: skb_mstamp_after helper
a helper to prepare the first main RACK patch. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/skbuff.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 4398411236f1..24f4dfd94c51 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -463,6 +463,15 @@ static inline u32 skb_mstamp_us_delta(const struct skb_mstamp *t1,
return delta_us;
}
+static inline bool skb_mstamp_after(const struct skb_mstamp *t1,
+ const struct skb_mstamp *t0)
+{
+ s32 diff = t1->stamp_jiffies - t0->stamp_jiffies;
+
+ if (!diff)
+ diff = t1->stamp_us - t0->stamp_us;
+ return diff > 0;
+}
/**
* struct sk_buff - socket buffer
OpenPOWER on IntegriCloud