From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Cc: netdev@vger.kernel.org, Gerrit Renker <gerrit@erg.abdn.ac.uk>
Subject: [PATCH 1/3] dccp ccid-2: Share TCP's minimum RTO code
Date: Fri, 13 Aug 2010 07:21:39 +0200 [thread overview]
Message-ID: <1281676901-7018-2-git-send-email-gerrit@erg.abdn.ac.uk> (raw)
In-Reply-To: <1281676901-7018-1-git-send-email-gerrit@erg.abdn.ac.uk>
Over the same link, DCCP and TCP face similar problems; and DCCP's
CCID-2 is in fact a restricted form of TCP.
Using the same RTO_MIN of 0.2 seconds was found to cause problems for CCID-2
over 802.11g: at least once per session there is a spurious timeout. It helped
to then increase the the value of RTO_MIN over this link.
Since the problem is the same as in TCP, this patch makes the solution from
commit "05bb1fad1cde025a864a90cfeb98dcbefe78a44a"
"[TCP]: Allow minimum RTO to be configurable via routing metrics."
available to DCCP.
This avoids reinventing the wheel, so that e.g. the following works in the
expected way now also for DCCP:
> ip route change 10.0.0.2 rto_min 800 dev ath0
Luckily this useful rto_min function was recently moved to net/tcp.h,
which simplifies sharing code originating from TCP.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/ccid2.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -267,8 +267,9 @@ static void ccid2_rtt_estimator(struct sock *sk, const long mrtt)
hc->tx_srtt = m << 3;
hc->tx_mdev = m << 1;
- hc->tx_mdev_max = max(TCP_RTO_MIN, hc->tx_mdev);
+ hc->tx_mdev_max = max(hc->tx_mdev, tcp_rto_min(sk));
hc->tx_rttvar = hc->tx_mdev_max;
+
hc->tx_rtt_seq = dccp_sk(sk)->dccps_gss;
} else {
/* Update scaled SRTT as SRTT += 1/8 * (m - SRTT) */
@@ -309,7 +310,7 @@ static void ccid2_rtt_estimator(struct sock *sk, const long mrtt)
hc->tx_rttvar -= (hc->tx_rttvar -
hc->tx_mdev_max) >> 2;
hc->tx_rtt_seq = dccp_sk(sk)->dccps_gss;
- hc->tx_mdev_max = TCP_RTO_MIN;
+ hc->tx_mdev_max = tcp_rto_min(sk);
}
}
WARNING: multiple messages have this Message-ID (diff)
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: [PATCH 1/3] dccp ccid-2: Share TCP's minimum RTO code
Date: Fri, 13 Aug 2010 05:21:39 +0000 [thread overview]
Message-ID: <1281676901-7018-2-git-send-email-gerrit@erg.abdn.ac.uk> (raw)
Over the same link, DCCP and TCP face similar problems; and DCCP's
CCID-2 is in fact a restricted form of TCP.
Using the same RTO_MIN of 0.2 seconds was found to cause problems for CCID-2
over 802.11g: at least once per session there is a spurious timeout. It helped
to then increase the the value of RTO_MIN over this link.
Since the problem is the same as in TCP, this patch makes the solution from
commit "05bb1fad1cde025a864a90cfeb98dcbefe78a44a"
"[TCP]: Allow minimum RTO to be configurable via routing metrics."
available to DCCP.
This avoids reinventing the wheel, so that e.g. the following works in the
expected way now also for DCCP:
> ip route change 10.0.0.2 rto_min 800 dev ath0
Luckily this useful rto_min function was recently moved to net/tcp.h,
which simplifies sharing code originating from TCP.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/ccid2.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -267,8 +267,9 @@ static void ccid2_rtt_estimator(struct sock *sk, const long mrtt)
hc->tx_srtt = m << 3;
hc->tx_mdev = m << 1;
- hc->tx_mdev_max = max(TCP_RTO_MIN, hc->tx_mdev);
+ hc->tx_mdev_max = max(hc->tx_mdev, tcp_rto_min(sk));
hc->tx_rttvar = hc->tx_mdev_max;
+
hc->tx_rtt_seq = dccp_sk(sk)->dccps_gss;
} else {
/* Update scaled SRTT as SRTT += 1/8 * (m - SRTT) */
@@ -309,7 +310,7 @@ static void ccid2_rtt_estimator(struct sock *sk, const long mrtt)
hc->tx_rttvar -= (hc->tx_rttvar -
hc->tx_mdev_max) >> 2;
hc->tx_rtt_seq = dccp_sk(sk)->dccps_gss;
- hc->tx_mdev_max = TCP_RTO_MIN;
+ hc->tx_mdev_max = tcp_rto_min(sk);
}
}
next prev parent reply other threads:[~2010-08-13 5:34 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ccid2_cwv_dccp_test_tree>
2010-08-13 5:21 ` dccp test-tree [PATCH 0/3] ccid-2: Congestion Window Validation, TCP code sharing Gerrit Renker
2010-08-13 5:21 ` Gerrit Renker
2010-08-13 5:21 ` Gerrit Renker [this message]
2010-08-13 5:21 ` [PATCH 1/3] dccp ccid-2: Share TCP's minimum RTO code Gerrit Renker
2010-08-13 5:21 ` [PATCH 2/3] dccp ccid-2: Use existing function to test for data packets Gerrit Renker
2010-08-13 5:21 ` Gerrit Renker
2010-08-13 5:21 ` [PATCH 3/3] dccp ccid-2: Perform congestion-window validation Gerrit Renker
2010-08-13 5:21 ` Gerrit Renker
2010-08-19 6:25 ` dccp test-tree [PATCH 0/3] ccid-2: Congestion Window Validation, TCP code sharing David Miller
2010-08-19 6:25 ` dccp test-tree [PATCH 0/3] ccid-2: Congestion Window David Miller
2010-08-19 6:28 ` dccp test-tree [PATCH 0/3] ccid-2: Congestion Window Validation, TCP code sharing David Miller
2010-08-19 6:28 ` dccp test-tree [PATCH 0/3] ccid-2: Congestion Window David Miller
2010-08-20 5:38 ` dccp test-tree [PATCH 0/3] ccid-2: Congestion Window Validation, TCP code sharing Gerrit Renker
2010-08-20 5:38 ` dccp test-tree [PATCH 0/3] ccid-2: Congestion Window Gerrit Renker
2010-08-20 7:40 ` dccp test-tree [PATCH 0/3] ccid-2: Congestion Window Validation, TCP code sharing David Miller
2010-08-20 7:40 ` dccp test-tree [PATCH 0/3] ccid-2: Congestion Window David Miller
2010-08-23 5:41 ` netdev-2.6 [PATCH 0/5] dccp: ccid-2/3 code clean up; TCP RTT estimator Gerrit Renker
2010-08-23 5:41 ` Gerrit Renker
2010-08-23 5:41 ` [PATCH 1/5] ccid: ccid-2/3 code cosmetics Gerrit Renker
2010-08-23 5:41 ` Gerrit Renker
2010-08-23 5:41 ` [PATCH 2/5] dccp ccid-3: No more CCID control blocks in LISTEN state Gerrit Renker
2010-08-23 5:41 ` Gerrit Renker
2010-08-23 5:41 ` [PATCH 3/5] dccp ccid-2: Remove redundant sanity tests Gerrit Renker
2010-08-23 5:41 ` Gerrit Renker
2010-08-23 5:41 ` [PATCH 4/5] dccp ccid-2: Simplify dec_pipe and rearming of RTO timer Gerrit Renker
2010-08-23 5:41 ` Gerrit Renker
2010-08-23 5:41 ` [PATCH 5/5] dccp ccid-2: Replace broken RTT estimator with better algorithm Gerrit Renker
2010-08-23 5:41 ` Gerrit Renker
2010-08-24 3:15 ` netdev-2.6 [PATCH 0/5] dccp: ccid-2/3 code clean up; TCP RTT estimator David Miller
2010-08-24 3:15 ` netdev-2.6 [PATCH 0/5] dccp: ccid-2/3 code clean up; TCP RTT David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281676901-7018-2-git-send-email-gerrit@erg.abdn.ac.uk \
--to=gerrit@erg.abdn.ac.uk \
--cc=dccp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.