Skip to content

Commit

Permalink
tcp: skb_mstamp_after helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yuchung Cheng authored and David S. Miller committed Oct 21, 2015
1 parent 77c6312 commit 625a5e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 625a5e1

Please sign in to comment.