projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6bccd3
)
[DCCP]: Introduces follows48 function
author
Ian McDonald
<ian.mcdonald@jandi.co.nz>
Sun, 27 Aug 2006 02:06:42 +0000
(19:06 -0700)
committer
David S. Miller
<davem@davemloft.net>
Sun, 27 Aug 2006 02:06:42 +0000
(19:06 -0700)
This adds a new function to see if two sequence numbers follow each
other.
Signed off by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/dccp.h
patch
|
blob
|
blame
|
history
diff --git
a/net/dccp/dccp.h
b/net/dccp/dccp.h
index b8931d33bec3c5d1f25d1b6ac806349d842b09b7..a5c5475724c0bf56f97348dcd40d2b5ebeed912e 100644
(file)
--- a/
net/dccp/dccp.h
+++ b/
net/dccp/dccp.h
@@
-81,6
+81,14
@@
static inline u64 max48(const u64 seq1, const u64 seq2)
return after48(seq1, seq2) ? seq1 : seq2;
}
+/* is seq1 next seqno after seq2 */
+static inline int follows48(const u64 seq1, const u64 seq2)
+{
+ int diff = (seq1 & 0xFFFF) - (seq2 & 0xFFFF);
+
+ return diff==1;
+}
+
enum {
DCCP_MIB_NUM = 0,
DCCP_MIB_ACTIVEOPENS, /* ActiveOpens */