diff options
-rw-r--r-- | net/dccp/dccp.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index a2c20a265b25..afb313ff216e 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -113,9 +113,12 @@ static inline void dccp_inc_seqno(u64 *seqno) | |||
113 | *seqno = ADD48(*seqno, 1); | 113 | *seqno = ADD48(*seqno, 1); |
114 | } | 114 | } |
115 | 115 | ||
116 | static inline u64 dccp_delta_seqno(u64 seqno1, u64 seqno2) | 116 | /* signed mod-2^48 distance: pos. if seqno1 < seqno2, neg. if seqno1 > seqno2 */ |
117 | static inline s64 dccp_delta_seqno(const u64 seqno1, const u64 seqno2) | ||
117 | { | 118 | { |
118 | return ((seqno2 << 16) - (seqno1 << 16)) >> 16; | 119 | u64 delta = SUB48(seqno2, seqno1); |
120 | |||
121 | return TO_SIGNED48(delta); | ||
119 | } | 122 | } |
120 | 123 | ||
121 | /* is seq1 < seq2 ? */ | 124 | /* is seq1 < seq2 ? */ |