aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2007-08-19 20:18:13 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:48:15 -0400
commit0740d49c2465bdd2644455c4bc49794395b73433 (patch)
tree2c8e2ef42b4b6d78730561f01b3607ca08888cd2 /net/dccp
parente7c2335794b949292ecfd01902c429e2ac3937e1 (diff)
[DCCP] packet_history: Convert dccphtx_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')
-rw-r--r--net/dccp/ccids/ccid3.c7
-rw-r--r--net/dccp/ccids/lib/packet_history.h3
2 files changed, 4 insertions, 6 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index b21d8110298c..e75efe72da2b 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -401,7 +401,7 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, int more,
401 } 401 }
402 dccp_tx_hist_add_entry(&hctx->ccid3hctx_hist, packet); 402 dccp_tx_hist_add_entry(&hctx->ccid3hctx_hist, packet);
403 403
404 packet->dccphtx_tstamp = ktime_to_timeval(ktime_get_real()); 404 packet->dccphtx_tstamp = ktime_get_real();
405 packet->dccphtx_seqno = dccp_sk(sk)->dccps_gss; 405 packet->dccphtx_seqno = dccp_sk(sk)->dccps_gss;
406 packet->dccphtx_rtt = hctx->ccid3hctx_rtt; 406 packet->dccphtx_rtt = hctx->ccid3hctx_rtt;
407 packet->dccphtx_sent = 1; 407 packet->dccphtx_sent = 1;
@@ -412,7 +412,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
412 struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk); 412 struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
413 struct ccid3_options_received *opt_recv; 413 struct ccid3_options_received *opt_recv;
414 struct dccp_tx_hist_entry *packet; 414 struct dccp_tx_hist_entry *packet;
415 ktime_t now, t_hist; 415 ktime_t now;
416 unsigned long t_nfb; 416 unsigned long t_nfb;
417 u32 pinv, r_sample; 417 u32 pinv, r_sample;
418 418
@@ -451,12 +451,11 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
451 hctx->ccid3hctx_p = 1000000 / pinv; 451 hctx->ccid3hctx_p = 1000000 / pinv;
452 452
453 now = ktime_get_real(); 453 now = ktime_get_real();
454 t_hist = timeval_to_ktime(packet->dccphtx_tstamp);
455 /* 454 /*
456 * Calculate new round trip sample as per [RFC 3448, 4.3] by 455 * Calculate new round trip sample as per [RFC 3448, 4.3] by
457 * R_sample = (now - t_recvdata) - t_elapsed 456 * R_sample = (now - t_recvdata) - t_elapsed
458 */ 457 */
459 r_sample = dccp_sample_rtt(sk, now, &t_hist); 458 r_sample = dccp_sample_rtt(sk, now, &packet->dccphtx_tstamp);
460 459
461 /* 460 /*
462 * Update RTT estimate by 461 * Update RTT estimate by
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h
index d9d68964d952..032bb61c6e39 100644
--- a/net/dccp/ccids/lib/packet_history.h
+++ b/net/dccp/ccids/lib/packet_history.h
@@ -40,7 +40,6 @@
40#include <linux/ktime.h> 40#include <linux/ktime.h>
41#include <linux/list.h> 41#include <linux/list.h>
42#include <linux/slab.h> 42#include <linux/slab.h>
43#include <linux/time.h>
44 43
45#include "../../dccp.h" 44#include "../../dccp.h"
46 45
@@ -58,7 +57,7 @@ struct dccp_tx_hist_entry {
58 u64 dccphtx_seqno:48, 57 u64 dccphtx_seqno:48,
59 dccphtx_sent:1; 58 dccphtx_sent:1;
60 u32 dccphtx_rtt; 59 u32 dccphtx_rtt;
61 struct timeval dccphtx_tstamp; 60 ktime_t dccphtx_tstamp;
62}; 61};
63 62
64struct dccp_tx_hist { 63struct dccp_tx_hist {