Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xcap
xcap-capability-linux
Commits
b3a3077d
Commit
b3a3077d
authored
Sep 09, 2005
by
Arnaldo Carvalho de Melo
Browse files
[CCID3] Make the ccid3hcrx_rtt calc look more like the ccid3hctx_rtt one
Signed-off-by:
Arnaldo Carvalho de Melo
<
acme@mandriva.com
>
parent
1a28599a
Changes
1
Hide whitespace changes
Inline
Side-by-side
net/dccp/ccids/ccid3.c
View file @
b3a3077d
...
...
@@ -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
)
...
...
@@ -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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment