Commit d011b9a4 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

dccp: do not use tcp_time_stamp

Use our own macro instead of abusing tcp_time_stamp
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ec66eda8
...@@ -233,7 +233,7 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, unsigned int len) ...@@ -233,7 +233,7 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, unsigned int len)
{ {
struct dccp_sock *dp = dccp_sk(sk); struct dccp_sock *dp = dccp_sk(sk);
struct ccid2_hc_tx_sock *hc = ccid2_hc_tx_sk(sk); struct ccid2_hc_tx_sock *hc = ccid2_hc_tx_sk(sk);
const u32 now = ccid2_time_stamp; const u32 now = ccid2_jiffies32;
struct ccid2_seq *next; struct ccid2_seq *next;
/* slow-start after idle periods (RFC 2581, RFC 2861) */ /* slow-start after idle periods (RFC 2581, RFC 2861) */
...@@ -466,7 +466,7 @@ static void ccid2_new_ack(struct sock *sk, struct ccid2_seq *seqp, ...@@ -466,7 +466,7 @@ static void ccid2_new_ack(struct sock *sk, struct ccid2_seq *seqp,
* The cleanest solution is to not use the ccid2s_sent field at all * The cleanest solution is to not use the ccid2s_sent field at all
* and instead use DCCP timestamps: requires changes in other places. * and instead use DCCP timestamps: requires changes in other places.
*/ */
ccid2_rtt_estimator(sk, ccid2_time_stamp - seqp->ccid2s_sent); ccid2_rtt_estimator(sk, ccid2_jiffies32 - seqp->ccid2s_sent);
} }
static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp) static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp)
...@@ -478,7 +478,7 @@ static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp) ...@@ -478,7 +478,7 @@ static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp)
return; return;
} }
hc->tx_last_cong = ccid2_time_stamp; hc->tx_last_cong = ccid2_jiffies32;
hc->tx_cwnd = hc->tx_cwnd / 2 ? : 1U; hc->tx_cwnd = hc->tx_cwnd / 2 ? : 1U;
hc->tx_ssthresh = max(hc->tx_cwnd, 2U); hc->tx_ssthresh = max(hc->tx_cwnd, 2U);
...@@ -731,7 +731,7 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) ...@@ -731,7 +731,7 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
hc->tx_rto = DCCP_TIMEOUT_INIT; hc->tx_rto = DCCP_TIMEOUT_INIT;
hc->tx_rpdupack = -1; hc->tx_rpdupack = -1;
hc->tx_last_cong = hc->tx_lsndtime = hc->tx_cwnd_stamp = ccid2_time_stamp; hc->tx_last_cong = hc->tx_lsndtime = hc->tx_cwnd_stamp = ccid2_jiffies32;
hc->tx_cwnd_used = 0; hc->tx_cwnd_used = 0;
setup_timer(&hc->tx_rtotimer, ccid2_hc_tx_rto_expire, setup_timer(&hc->tx_rtotimer, ccid2_hc_tx_rto_expire,
(unsigned long)sk); (unsigned long)sk);
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
* CCID-2 timestamping faces the same issues as TCP timestamping. * CCID-2 timestamping faces the same issues as TCP timestamping.
* Hence we reuse/share as much of the code as possible. * Hence we reuse/share as much of the code as possible.
*/ */
#define ccid2_time_stamp tcp_time_stamp #define ccid2_jiffies32 ((u32)jiffies)
/* NUMDUPACK parameter from RFC 4341, p. 6 */ /* NUMDUPACK parameter from RFC 4341, p. 6 */
#define NUMDUPACK 3 #define NUMDUPACK 3
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment