diff options
-rw-r--r-- | net/dccp/ccids/ccid3.c | 10 | ||||
-rw-r--r-- | net/dccp/ccids/ccid3.h | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 694149061b8b..ffd5b449f5f1 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -905,7 +905,7 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data) | |||
905 | hctx->ccid3hctx_x = 10; | 905 | hctx->ccid3hctx_x = 10; |
906 | } | 906 | } |
907 | /* Schedule no feedback timer to expire in max(4 * R, 2 * s / X) */ | 907 | /* Schedule no feedback timer to expire in max(4 * R, 2 * s / X) */ |
908 | next_tmout = max_t(u32, inet_csk(sk)->icsk_rto, | 908 | next_tmout = max_t(u32, hctx->ccid3hctx_t_rto, |
909 | 2 * (hctx->ccid3hctx_s * 100000) / (hctx->ccid3hctx_x / 10)); | 909 | 2 * (hctx->ccid3hctx_s * 100000) / (hctx->ccid3hctx_x / 10)); |
910 | break; | 910 | break; |
911 | default: | 911 | default: |
@@ -1180,8 +1180,8 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
1180 | r_sample); | 1180 | r_sample); |
1181 | 1181 | ||
1182 | /* Update timeout interval */ | 1182 | /* Update timeout interval */ |
1183 | inet_csk(sk)->icsk_rto = max_t(u32, 4 * hctx->ccid3hctx_rtt, | 1183 | hctx->ccid3hctx_t_rto = max_t(u32, 4 * hctx->ccid3hctx_rtt, |
1184 | USEC_PER_SEC); | 1184 | USEC_PER_SEC); |
1185 | 1185 | ||
1186 | /* Update receive rate */ | 1186 | /* Update receive rate */ |
1187 | hctx->ccid3hctx_x_recv = x_recv; /* x_recv in bytes per second */ | 1187 | hctx->ccid3hctx_x_recv = x_recv; /* x_recv in bytes per second */ |
@@ -1227,7 +1227,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
1227 | /* to prevent divide by zero below */ | 1227 | /* to prevent divide by zero below */ |
1228 | 1228 | ||
1229 | /* Schedule no feedback timer to expire in max(4 * R, 2 * s / X) */ | 1229 | /* Schedule no feedback timer to expire in max(4 * R, 2 * s / X) */ |
1230 | next_tmout = max(inet_csk(sk)->icsk_rto, | 1230 | next_tmout = max(hctx->ccid3hctx_t_rto, |
1231 | (2 * (hctx->ccid3hctx_s * 100000) / | 1231 | (2 * (hctx->ccid3hctx_s * 100000) / |
1232 | (hctx->ccid3hctx_x / 10))); | 1232 | (hctx->ccid3hctx_x / 10))); |
1233 | /* maths with 100000 and 10 is to prevent overflow with 32 bit */ | 1233 | /* maths with 100000 and 10 is to prevent overflow with 32 bit */ |
@@ -1340,7 +1340,7 @@ static int ccid3_hc_tx_init(struct sock *sk) | |||
1340 | 1340 | ||
1341 | hctx->ccid3hctx_x = hctx->ccid3hctx_s; /* set transmission rate to 1 packet per second */ | 1341 | hctx->ccid3hctx_x = hctx->ccid3hctx_s; /* set transmission rate to 1 packet per second */ |
1342 | hctx->ccid3hctx_rtt = 4; /* See ccid3_hc_tx_packet_sent win_count calculatation */ | 1342 | hctx->ccid3hctx_rtt = 4; /* See ccid3_hc_tx_packet_sent win_count calculatation */ |
1343 | inet_csk(sk)->icsk_rto = USEC_PER_SEC; | 1343 | hctx->ccid3hctx_t_rto = USEC_PER_SEC; |
1344 | hctx->ccid3hctx_state = TFRC_SSTATE_NO_SENT; | 1344 | hctx->ccid3hctx_state = TFRC_SSTATE_NO_SENT; |
1345 | INIT_LIST_HEAD(&hctx->ccid3hctx_hist); | 1345 | INIT_LIST_HEAD(&hctx->ccid3hctx_hist); |
1346 | init_timer(&hctx->ccid3hctx_no_feedback_timer); | 1346 | init_timer(&hctx->ccid3hctx_no_feedback_timer); |
diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h index d2705fb74195..5ef72cda7cd7 100644 --- a/net/dccp/ccids/ccid3.h +++ b/net/dccp/ccids/ccid3.h | |||
@@ -80,6 +80,7 @@ struct ccid3_hc_tx_sock { | |||
80 | struct timer_list ccid3hctx_no_feedback_timer; | 80 | struct timer_list ccid3hctx_no_feedback_timer; |
81 | struct timeval ccid3hctx_t_ld; | 81 | struct timeval ccid3hctx_t_ld; |
82 | struct timeval ccid3hctx_t_nom; | 82 | struct timeval ccid3hctx_t_nom; |
83 | u32 ccid3hctx_t_rto; | ||
83 | u32 ccid3hctx_t_ipi; | 84 | u32 ccid3hctx_t_ipi; |
84 | u32 ccid3hctx_delta; | 85 | u32 ccid3hctx_delta; |
85 | struct list_head ccid3hctx_hist; | 86 | struct list_head ccid3hctx_hist; |