diff options
Diffstat (limited to 'net/dccp/dccp.h')
-rw-r--r-- | net/dccp/dccp.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index f2230fc168e1..d6bc47363b1c 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -42,9 +42,11 @@ | |||
42 | extern int dccp_debug; | 42 | extern int dccp_debug; |
43 | #define dccp_pr_debug(format, a...) DCCP_PR_DEBUG(dccp_debug, format, ##a) | 43 | #define dccp_pr_debug(format, a...) DCCP_PR_DEBUG(dccp_debug, format, ##a) |
44 | #define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a) | 44 | #define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a) |
45 | #define dccp_debug(fmt, a...) dccp_pr_debug_cat(KERN_DEBUG fmt, ##a) | ||
45 | #else | 46 | #else |
46 | #define dccp_pr_debug(format, a...) | 47 | #define dccp_pr_debug(format, a...) |
47 | #define dccp_pr_debug_cat(format, a...) | 48 | #define dccp_pr_debug_cat(format, a...) |
49 | #define dccp_debug(format, a...) | ||
48 | #endif | 50 | #endif |
49 | 51 | ||
50 | extern struct inet_hashinfo dccp_hashinfo; | 52 | extern struct inet_hashinfo dccp_hashinfo; |
@@ -61,11 +63,14 @@ extern void dccp_time_wait(struct sock *sk, int state, int timeo); | |||
61 | * - DCCP-Reset with ACK Subheader and 4 bytes of Reset Code fields | 63 | * - DCCP-Reset with ACK Subheader and 4 bytes of Reset Code fields |
62 | * Hence a safe upper bound for the maximum option length is 1020-28 = 992 | 64 | * Hence a safe upper bound for the maximum option length is 1020-28 = 992 |
63 | */ | 65 | */ |
64 | #define MAX_DCCP_SPECIFIC_HEADER (255 * sizeof(int)) | 66 | #define MAX_DCCP_SPECIFIC_HEADER (255 * sizeof(uint32_t)) |
65 | #define DCCP_MAX_PACKET_HDR 28 | 67 | #define DCCP_MAX_PACKET_HDR 28 |
66 | #define DCCP_MAX_OPT_LEN (MAX_DCCP_SPECIFIC_HEADER - DCCP_MAX_PACKET_HDR) | 68 | #define DCCP_MAX_OPT_LEN (MAX_DCCP_SPECIFIC_HEADER - DCCP_MAX_PACKET_HDR) |
67 | #define MAX_DCCP_HEADER (MAX_DCCP_SPECIFIC_HEADER + MAX_HEADER) | 69 | #define MAX_DCCP_HEADER (MAX_DCCP_SPECIFIC_HEADER + MAX_HEADER) |
68 | 70 | ||
71 | /* Upper bound for initial feature-negotiation overhead (padded to 32 bits) */ | ||
72 | #define DCCP_FEATNEG_OVERHEAD (32 * sizeof(uint32_t)) | ||
73 | |||
69 | #define DCCP_TIMEWAIT_LEN (60 * HZ) /* how long to wait to destroy TIME-WAIT | 74 | #define DCCP_TIMEWAIT_LEN (60 * HZ) /* how long to wait to destroy TIME-WAIT |
70 | * state, about 60 seconds */ | 75 | * state, about 60 seconds */ |
71 | 76 | ||
@@ -95,9 +100,6 @@ extern void dccp_time_wait(struct sock *sk, int state, int timeo); | |||
95 | extern int sysctl_dccp_request_retries; | 100 | extern int sysctl_dccp_request_retries; |
96 | extern int sysctl_dccp_retries1; | 101 | extern int sysctl_dccp_retries1; |
97 | extern int sysctl_dccp_retries2; | 102 | extern int sysctl_dccp_retries2; |
98 | extern int sysctl_dccp_feat_sequence_window; | ||
99 | extern int sysctl_dccp_feat_rx_ccid; | ||
100 | extern int sysctl_dccp_feat_tx_ccid; | ||
101 | extern int sysctl_dccp_tx_qlen; | 103 | extern int sysctl_dccp_tx_qlen; |
102 | extern int sysctl_dccp_sync_ratelimit; | 104 | extern int sysctl_dccp_sync_ratelimit; |
103 | 105 | ||
@@ -409,23 +411,21 @@ static inline void dccp_hdr_set_ack(struct dccp_hdr_ack_bits *dhack, | |||
409 | static inline void dccp_update_gsr(struct sock *sk, u64 seq) | 411 | static inline void dccp_update_gsr(struct sock *sk, u64 seq) |
410 | { | 412 | { |
411 | struct dccp_sock *dp = dccp_sk(sk); | 413 | struct dccp_sock *dp = dccp_sk(sk); |
412 | const struct dccp_minisock *dmsk = dccp_msk(sk); | ||
413 | 414 | ||
414 | dp->dccps_gsr = seq; | 415 | dp->dccps_gsr = seq; |
415 | dccp_set_seqno(&dp->dccps_swl, | 416 | /* Sequence validity window depends on remote Sequence Window (7.5.1) */ |
416 | dp->dccps_gsr + 1 - (dmsk->dccpms_sequence_window / 4)); | 417 | dp->dccps_swl = SUB48(ADD48(dp->dccps_gsr, 1), dp->dccps_r_seq_win / 4); |
417 | dccp_set_seqno(&dp->dccps_swh, | 418 | dp->dccps_swh = ADD48(dp->dccps_gsr, (3 * dp->dccps_r_seq_win) / 4); |
418 | dp->dccps_gsr + (3 * dmsk->dccpms_sequence_window) / 4); | ||
419 | } | 419 | } |
420 | 420 | ||
421 | static inline void dccp_update_gss(struct sock *sk, u64 seq) | 421 | static inline void dccp_update_gss(struct sock *sk, u64 seq) |
422 | { | 422 | { |
423 | struct dccp_sock *dp = dccp_sk(sk); | 423 | struct dccp_sock *dp = dccp_sk(sk); |
424 | 424 | ||
425 | dp->dccps_awh = dp->dccps_gss = seq; | 425 | dp->dccps_gss = seq; |
426 | dccp_set_seqno(&dp->dccps_awl, | 426 | /* Ack validity window depends on local Sequence Window value (7.5.1) */ |
427 | (dp->dccps_gss - | 427 | dp->dccps_awl = SUB48(ADD48(dp->dccps_gss, 1), dp->dccps_l_seq_win); |
428 | dccp_msk(sk)->dccpms_sequence_window + 1)); | 428 | dp->dccps_awh = dp->dccps_gss; |
429 | } | 429 | } |
430 | 430 | ||
431 | static inline int dccp_ack_pending(const struct sock *sk) | 431 | static inline int dccp_ack_pending(const struct sock *sk) |