aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/sctp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp/sctp.h')
-rw-r--r--include/net/sctp/sctp.h22
1 files changed, 1 insertions, 21 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 8e4de46c052e..90c1cccd164d 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -109,6 +109,7 @@ void sctp_copy_sock(struct sock *newsk, struct sock *sk,
109 struct sctp_association *asoc); 109 struct sctp_association *asoc);
110extern struct percpu_counter sctp_sockets_allocated; 110extern struct percpu_counter sctp_sockets_allocated;
111int sctp_asconf_mgmt(struct sctp_sock *, struct sctp_sockaddr_entry *); 111int sctp_asconf_mgmt(struct sctp_sock *, struct sctp_sockaddr_entry *);
112struct sk_buff *sctp_skb_recv_datagram(struct sock *, int, int, int *);
112 113
113/* 114/*
114 * sctp/primitive.c 115 * sctp/primitive.c
@@ -388,27 +389,6 @@ static inline int sctp_list_single_entry(struct list_head *head)
388 return (head->next != head) && (head->next == head->prev); 389 return (head->next != head) && (head->next == head->prev);
389} 390}
390 391
391/* Generate a random jitter in the range of -50% ~ +50% of input RTO. */
392static inline __s32 sctp_jitter(__u32 rto)
393{
394 static __u32 sctp_rand;
395 __s32 ret;
396
397 /* Avoid divide by zero. */
398 if (!rto)
399 rto = 1;
400
401 sctp_rand += jiffies;
402 sctp_rand ^= (sctp_rand << 12);
403 sctp_rand ^= (sctp_rand >> 20);
404
405 /* Choose random number from 0 to rto, then move to -50% ~ +50%
406 * of rto.
407 */
408 ret = sctp_rand % rto - (rto >> 1);
409 return ret;
410}
411
412/* Break down data chunks at this point. */ 392/* Break down data chunks at this point. */
413static inline int sctp_frag_point(const struct sctp_association *asoc, int pmtu) 393static inline int sctp_frag_point(const struct sctp_association *asoc, int pmtu)
414{ 394{