]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dccp: do not use tcp_time_stamp
authorEric Dumazet <edumazet@google.com>
Tue, 16 May 2017 21:00:02 +0000 (14:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 May 2017 20:06:01 +0000 (16:06 -0400)
Use our own macro instead of abusing tcp_time_stamp

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ccids/ccid2.c
net/dccp/ccids/ccid2.h

index 5e3a7302f7747e4c4f3134eacab2f2c65b13402f..e1295d5f2c562e8785f59a0f5bd7064f471e85ab 100644 (file)
@@ -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 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;
 
        /* 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,
         * The cleanest solution is to not use the ccid2s_sent field at all
         * 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)
@@ -478,7 +478,7 @@ static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp)
                return;
        }
 
-       hc->tx_last_cong = ccid2_time_stamp;
+       hc->tx_last_cong = ccid2_jiffies32;
 
        hc->tx_cwnd      = hc->tx_cwnd / 2 ? : 1U;
        hc->tx_ssthresh  = max(hc->tx_cwnd, 2U);
@@ -731,7 +731,7 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
 
        hc->tx_rto       = DCCP_TIMEOUT_INIT;
        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;
        setup_timer(&hc->tx_rtotimer, ccid2_hc_tx_rto_expire,
                        (unsigned long)sk);
index 18c97543e522a6b9a5c8a3c817d4b40224adde48..6e50ef2898fb9dd9080217cc167defea6a2e9021 100644 (file)
@@ -27,7 +27,7 @@
  * CCID-2 timestamping faces the same issues as TCP timestamping.
  * 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 */
 #define NUMDUPACK      3