Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8281
b: refs/heads/master
c: b3a3077
h: refs/heads/master
i:
  8279: 7dc8442
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Sep 9, 2005
1 parent 9efcd71 commit 5af4be7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a28599a2c2781dd6af72f4f84175e2db74d3bb1
refs/heads/master: b3a3077d963fc54a25be26e2e84fe9f4327c1e12
22 changes: 18 additions & 4 deletions trunk/net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
struct dccp_rx_hist_entry *packet;
struct timeval now;
u8 win_count;
u32 p_prev;
u32 p_prev, r_sample, t_elapsed;
int ins;

if (hcrx == NULL)
Expand All @@ -982,9 +982,23 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
break;
p_prev = hcrx->ccid3hcrx_rtt;
do_gettimeofday(&now);
hcrx->ccid3hcrx_rtt = timeval_usecs(&now) -
(opt_recv->dccpor_timestamp_echo -
opt_recv->dccpor_elapsed_time) * 10;
timeval_sub_usecs(&now, opt_recv->dccpor_timestamp_echo * 10);
r_sample = timeval_usecs(&now);
t_elapsed = opt_recv->dccpor_elapsed_time * 10;

if (unlikely(r_sample <= t_elapsed))
LIMIT_NETDEBUG(KERN_WARNING
"%s: r_sample=%uus, t_elapsed=%uus\n",
__FUNCTION__, r_sample, t_elapsed);
else
r_sample -= t_elapsed;

if (hcrx->ccid3hcrx_state == TFRC_RSTATE_NO_DATA)
hcrx->ccid3hcrx_rtt = r_sample;
else
hcrx->ccid3hcrx_rtt = (hcrx->ccid3hcrx_rtt * 9) / 10 +
r_sample / 10;

if (p_prev != hcrx->ccid3hcrx_rtt)
ccid3_pr_debug("%s, New RTT=%luus, elapsed time=%u\n",
dccp_role(sk), hcrx->ccid3hcrx_rtt,
Expand Down

0 comments on commit 5af4be7

Please sign in to comment.