summaryrefslogtreecommitdiff
path: root/net/dccp/ccids/lib/loss_interval.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2007-08-20 04:17:51 +0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 03:48:14 +0400
commite7c2335794b949292ecfd01902c429e2ac3937e1 (patch)
tree1e10116e6635e1b4c1da7890817fd89d6eab285d /net/dccp/ccids/lib/loss_interval.c
parentb8bda9d70842dab7902f0681e1297dcf0460fc94 (diff)
downloadlinux-e7c2335794b949292ecfd01902c429e2ac3937e1.tar.xz
[DCCP] packet_history: convert dccphrx_tstamp to ktime_t
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids/lib/loss_interval.c')
-rw-r--r--net/dccp/ccids/lib/loss_interval.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c
index 174d3f13d93f..40ad428a27f5 100644
--- a/net/dccp/ccids/lib/loss_interval.c
+++ b/net/dccp/ccids/lib/loss_interval.c
@@ -125,14 +125,14 @@ static int dccp_li_hist_interval_new(struct list_head *list,
* returns estimated loss interval in usecs */
static u32 dccp_li_calc_first_li(struct sock *sk,
struct list_head *hist_list,
- struct timeval *last_feedback,
+ ktime_t last_feedback,
u16 s, u32 bytes_recv,
u32 previous_x_recv)
{
struct dccp_rx_hist_entry *entry, *next, *tail = NULL;
u32 x_recv, p;
suseconds_t rtt, delta;
- struct timeval tstamp = { 0, 0 };
+ ktime_t tstamp = ktime_set(0, 0);
int interval = 0;
int win_count = 0;
int step = 0;
@@ -176,7 +176,7 @@ found:
return ~0;
}
- delta = timeval_delta(&tstamp, &tail->dccphrx_tstamp);
+ delta = ktime_us_delta(tstamp, tail->dccphrx_tstamp);
DCCP_BUG_ON(delta < 0);
rtt = delta * 4 / interval;
@@ -196,8 +196,7 @@ found:
return ~0;
}
- dccp_timestamp(sk, &tstamp);
- delta = timeval_delta(&tstamp, last_feedback);
+ delta = ktime_us_delta(ktime_get_real(), last_feedback);
DCCP_BUG_ON(delta <= 0);
x_recv = scaled_div32(bytes_recv, delta);
@@ -226,7 +225,7 @@ found:
void dccp_li_update_li(struct sock *sk,
struct list_head *li_hist_list,
struct list_head *hist_list,
- struct timeval *last_feedback, u16 s, u32 bytes_recv,
+ ktime_t last_feedback, u16 s, u32 bytes_recv,
u32 previous_x_recv, u64 seq_loss, u8 win_loss)
{
struct dccp_li_hist_entry *head;