Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66286
b: refs/heads/master
c: 23f062a
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Oct 10, 2007
1 parent b30fe81 commit 35eff86
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 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: ac198ea8d94a46830080372a539420cf4a8de4a3
refs/heads/master: 23f062af6e90654ef939462c2c060ad103dec6f2
12 changes: 5 additions & 7 deletions trunk/net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,10 @@ static void ccid3_hc_tx_update_x(struct sock *sk)
TFRC_T_MBI);

} else {
struct timeval now;
const ktime_t now = ktime_get_real();

dccp_timestamp(sk, &now);

if ((timeval_delta(&now, &hctx->ccid3hctx_t_ld) -
(suseconds_t)hctx->ccid3hctx_rtt) >= 0) {
if ((ktime_us_delta(now, hctx->ccid3hctx_t_ld) -
(s64)hctx->ccid3hctx_rtt) >= 0) {

hctx->ccid3hctx_x =
max(min(2 * hctx->ccid3hctx_x, min_rate),
Expand Down Expand Up @@ -343,7 +341,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
ccid3_pr_debug("SYN RTT = %uus\n", dp->dccps_syn_rtt);
hctx->ccid3hctx_rtt = dp->dccps_syn_rtt;
hctx->ccid3hctx_x = rfc3390_initial_rate(sk);
hctx->ccid3hctx_t_ld = ktime_to_timeval(now);
hctx->ccid3hctx_t_ld = now;
} else {
/* Sender does not have RTT sample: X = MSS/second */
hctx->ccid3hctx_x = dp->dccps_mss_cache;
Expand Down Expand Up @@ -477,7 +475,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
*/
hctx->ccid3hctx_rtt = r_sample;
hctx->ccid3hctx_x = rfc3390_initial_rate(sk);
hctx->ccid3hctx_t_ld = now;
hctx->ccid3hctx_t_ld = timeval_to_ktime(now);

ccid3_update_send_interval(hctx);

Expand Down
3 changes: 1 addition & 2 deletions trunk/net/dccp/ccids/ccid3.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

#include <linux/ktime.h>
#include <linux/list.h>
#include <linux/time.h>
#include <linux/types.h>
#include <linux/tfrc.h>
#include "../ccid.h"
Expand Down Expand Up @@ -111,7 +110,7 @@ struct ccid3_hc_tx_sock {
u8 ccid3hctx_idle;
ktime_t ccid3hctx_t_last_win_count;
struct timer_list ccid3hctx_no_feedback_timer;
struct timeval ccid3hctx_t_ld;
ktime_t ccid3hctx_t_ld;
ktime_t ccid3hctx_t_nom;
u32 ccid3hctx_delta;
struct list_head ccid3hctx_hist;
Expand Down

0 comments on commit 35eff86

Please sign in to comment.