[CCID3]: Move the CCID3 defines to ccid3.h

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Arnaldo Carvalho de Melo and committed by
David S. Miller
cfc3c525 6b5e633a

+39 -38
+2 -33
net/dccp/ccids/ccid3.c
··· 49 49 return b > 20 ? tmp / (b / 10) : tmp; 50 50 } 51 51 52 - #ifdef CCID3_DEBUG 53 - extern int ccid3_debug; 52 + static int ccid3_debug; 54 53 54 + #ifdef CCID3_DEBUG 55 55 #define ccid3_pr_debug(format, a...) \ 56 56 do { if (ccid3_debug) \ 57 57 printk(KERN_DEBUG "%s: " format, __FUNCTION__, ##a); \ ··· 59 59 #else 60 60 #define ccid3_pr_debug(format, a...) 61 61 #endif 62 - 63 - #define TFRC_MIN_PACKET_SIZE 16 64 - #define TFRC_STD_PACKET_SIZE 256 65 - #define TFRC_MAX_PACKET_SIZE 65535 66 - 67 - #define TFRC_INITIAL_TIMEOUT (2 * USEC_PER_SEC) 68 - /* two seconds as per CCID3 spec 11 */ 69 - 70 - #define TFRC_OPSYS_HALF_TIME_GRAN (USEC_PER_SEC / (2 * HZ)) 71 - /* above is in usecs - half the scheduling granularity as per RFC3448 4.6 */ 72 - 73 - #define TFRC_WIN_COUNT_PER_RTT 4 74 - #define TFRC_WIN_COUNT_LIMIT 16 75 - 76 - #define TFRC_MAX_BACK_OFF_TIME 64 77 - /* above is in seconds */ 78 - 79 - #define TFRC_SMALLEST_P 40 80 - 81 - #define TFRC_RECV_IVAL_F_LENGTH 8 /* length(w[]) */ 82 - 83 - /* Number of later packets received before one is considered lost */ 84 - #define TFRC_RECV_NUM_LATE_LOSS 3 85 - 86 - enum ccid3_options { 87 - TFRC_OPT_LOSS_EVENT_RATE = 192, 88 - TFRC_OPT_LOSS_INTERVALS = 193, 89 - TFRC_OPT_RECEIVE_RATE = 194, 90 - }; 91 - 92 - static int ccid3_debug; 93 62 94 63 static struct dccp_tx_hist *ccid3_tx_hist; 95 64 static struct dccp_rx_hist *ccid3_rx_hist;
+37 -5
net/dccp/ccids/ccid3.h
··· 36 36 #ifndef _DCCP_CCID3_H_ 37 37 #define _DCCP_CCID3_H_ 38 38 39 - #include <linux/types.h> 39 + #include <linux/config.h> 40 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 73 struct ccid3_options_received { 43 74 u64 ccid3or_seqno:48, ··· 78 47 u32 ccid3or_receive_rate; 79 48 }; 80 49 81 - /** struct ccid3_hc_tx_sock - CCID3 sender half connection congestion control block 50 + /** struct ccid3_hc_tx_sock - CCID3 sender half connection sock 82 51 * 83 52 * @ccid3hctx_state - Sender state 84 53 * @ccid3hctx_x - Current sending rate ··· 88 57 * @ccid3hctx_rtt - Estimate of current round trip time in usecs 89 58 * @@ccid3hctx_p - Current loss event rate (0-1) scaled by 1000000 90 59 * @ccid3hctx_last_win_count - Last window counter sent 91 - * @ccid3hctx_t_last_win_count - Timestamp of earliest packet with last_win_count value sent 60 + * @ccid3hctx_t_last_win_count - Timestamp of earliest packet 61 + * with last_win_count value sent 92 62 * @ccid3hctx_no_feedback_timer - Handle to no feedback timer 93 63 * @ccid3hctx_idle - FIXME 94 64 * @ccid3hctx_t_ld - Time last doubled during slow start ··· 144 112 }; 145 113 146 114 #define ccid3_hc_tx_field(s,field) (s->dccps_hc_tx_ccid_private == NULL ? 0 : \ 147 - ((struct ccid3_hc_tx_sock *)s->dccps_hc_tx_ccid_private)->ccid3hctx_##field) 115 + ((struct ccid3_hc_tx_sock *)s->dccps_hc_tx_ccid_private)->ccid3hctx_##field) 148 116 149 117 #define ccid3_hc_rx_field(s,field) (s->dccps_hc_rx_ccid_private == NULL ? 0 : \ 150 - ((struct ccid3_hc_rx_sock *)s->dccps_hc_rx_ccid_private)->ccid3hcrx_##field) 118 + ((struct ccid3_hc_rx_sock *)s->dccps_hc_rx_ccid_private)->ccid3hcrx_##field) 151 119 152 120 #endif /* _DCCP_CCID3_H_ */