diff options
Diffstat (limited to 'net/dccp/ccids/ccid3.h')
-rw-r--r-- | net/dccp/ccids/ccid3.h | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h index 5ef72cda7cd7..f8965700bbe9 100644 --- a/net/dccp/ccids/ccid3.h +++ b/net/dccp/ccids/ccid3.h | |||
@@ -36,8 +36,39 @@ | |||
36 | #ifndef _DCCP_CCID3_H_ | 36 | #ifndef _DCCP_CCID3_H_ |
37 | #define _DCCP_CCID3_H_ | 37 | #define _DCCP_CCID3_H_ |
38 | 38 | ||
39 | #include <linux/types.h> | 39 | #include <linux/config.h> |
40 | #include <linux/list.h> | 40 | #include <linux/list.h> |
41 | #include <linux/time.h> | ||
42 | #include <linux/types.h> | ||
43 | |||
44 | #define TFRC_MIN_PACKET_SIZE 16 | ||
45 | #define TFRC_STD_PACKET_SIZE 256 | ||
46 | #define TFRC_MAX_PACKET_SIZE 65535 | ||
47 | |||
48 | /* Two seconds as per CCID3 spec */ | ||
49 | #define TFRC_INITIAL_TIMEOUT (2 * USEC_PER_SEC) | ||
50 | |||
51 | /* In usecs - half the scheduling granularity as per RFC3448 4.6 */ | ||
52 | #define TFRC_OPSYS_HALF_TIME_GRAN (USEC_PER_SEC / (2 * HZ)) | ||
53 | |||
54 | #define TFRC_WIN_COUNT_PER_RTT 4 | ||
55 | #define TFRC_WIN_COUNT_LIMIT 16 | ||
56 | |||
57 | /* In seconds */ | ||
58 | #define TFRC_MAX_BACK_OFF_TIME 64 | ||
59 | |||
60 | #define TFRC_SMALLEST_P 40 | ||
61 | |||
62 | #define TFRC_RECV_IVAL_F_LENGTH 8 | ||
63 | |||
64 | /* Number of later packets received before one is considered lost */ | ||
65 | #define TFRC_RECV_NUM_LATE_LOSS 3 | ||
66 | |||
67 | enum ccid3_options { | ||
68 | TFRC_OPT_LOSS_EVENT_RATE = 192, | ||
69 | TFRC_OPT_LOSS_INTERVALS = 193, | ||
70 | TFRC_OPT_RECEIVE_RATE = 194, | ||
71 | }; | ||
41 | 72 | ||
42 | struct ccid3_options_received { | 73 | struct ccid3_options_received { |
43 | u64 ccid3or_seqno:48, | 74 | u64 ccid3or_seqno:48, |
@@ -47,7 +78,7 @@ struct ccid3_options_received { | |||
47 | u32 ccid3or_receive_rate; | 78 | u32 ccid3or_receive_rate; |
48 | }; | 79 | }; |
49 | 80 | ||
50 | /** struct ccid3_hc_tx_sock - CCID3 sender half connection congestion control block | 81 | /** struct ccid3_hc_tx_sock - CCID3 sender half connection sock |
51 | * | 82 | * |
52 | * @ccid3hctx_state - Sender state | 83 | * @ccid3hctx_state - Sender state |
53 | * @ccid3hctx_x - Current sending rate | 84 | * @ccid3hctx_x - Current sending rate |
@@ -57,7 +88,8 @@ struct ccid3_options_received { | |||
57 | * @ccid3hctx_rtt - Estimate of current round trip time in usecs | 88 | * @ccid3hctx_rtt - Estimate of current round trip time in usecs |
58 | * @@ccid3hctx_p - Current loss event rate (0-1) scaled by 1000000 | 89 | * @@ccid3hctx_p - Current loss event rate (0-1) scaled by 1000000 |
59 | * @ccid3hctx_last_win_count - Last window counter sent | 90 | * @ccid3hctx_last_win_count - Last window counter sent |
60 | * @ccid3hctx_t_last_win_count - Timestamp of earliest packet with last_win_count value sent | 91 | * @ccid3hctx_t_last_win_count - Timestamp of earliest packet |
92 | * with last_win_count value sent | ||
61 | * @ccid3hctx_no_feedback_timer - Handle to no feedback timer | 93 | * @ccid3hctx_no_feedback_timer - Handle to no feedback timer |
62 | * @ccid3hctx_idle - FIXME | 94 | * @ccid3hctx_idle - FIXME |
63 | * @ccid3hctx_t_ld - Time last doubled during slow start | 95 | * @ccid3hctx_t_ld - Time last doubled during slow start |
@@ -112,9 +144,9 @@ struct ccid3_hc_rx_sock { | |||
112 | }; | 144 | }; |
113 | 145 | ||
114 | #define ccid3_hc_tx_field(s,field) (s->dccps_hc_tx_ccid_private == NULL ? 0 : \ | 146 | #define ccid3_hc_tx_field(s,field) (s->dccps_hc_tx_ccid_private == NULL ? 0 : \ |
115 | ((struct ccid3_hc_tx_sock *)s->dccps_hc_tx_ccid_private)->ccid3hctx_##field) | 147 | ((struct ccid3_hc_tx_sock *)s->dccps_hc_tx_ccid_private)->ccid3hctx_##field) |
116 | 148 | ||
117 | #define ccid3_hc_rx_field(s,field) (s->dccps_hc_rx_ccid_private == NULL ? 0 : \ | 149 | #define ccid3_hc_rx_field(s,field) (s->dccps_hc_rx_ccid_private == NULL ? 0 : \ |
118 | ((struct ccid3_hc_rx_sock *)s->dccps_hc_rx_ccid_private)->ccid3hcrx_##field) | 150 | ((struct ccid3_hc_rx_sock *)s->dccps_hc_rx_ccid_private)->ccid3hcrx_##field) |
119 | 151 | ||
120 | #endif /* _DCCP_CCID3_H_ */ | 152 | #endif /* _DCCP_CCID3_H_ */ |