DCCP protocol discussions
 help / color / mirror / Atom feed
* [PATCH 5/5]: Use feature-negotiation to report Ack Ratio changes
@ 2007-10-04 14:02 Gerrit Renker
  2007-10-05  7:04 ` Ian McDonald
  0 siblings, 1 reply; 2+ messages in thread
From: Gerrit Renker @ 2007-10-04 14:02 UTC (permalink / raw)
  To: dccp

[CCID2]: Use feature-negotiation to report Ack Ratio changes

This uses the new feature-negotiation framework to signal Ack Ratio changes,
as required by RFC 4341, sec. 6.1.2. 

This raises some problems for CCID2 since it can at the moment not cope grace-
fully with Ack Ratio of e.g. 2. A FIXME has thus been added which reverts to
the previous policy of bypassing the Ack Ratio sysctl.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
 Documentation/networking/dccp.txt |    4 +++-
 net/dccp/minisocks.c              |   12 ++++++++++++
 net/dccp/proto.c                  |    1 -
 3 files changed, 15 insertions(+), 2 deletions(-)

--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -190,7 +190,6 @@ int dccp_init_sock(struct sock *sk, cons
 	dp->dccps_rate_last	= jiffies;
 	dp->dccps_role		= DCCP_ROLE_UNDEFINED;
 	dp->dccps_service	= DCCP_SERVICE_CODE_IS_ABSENT;
-	dp->dccps_l_ack_ratio	= dp->dccps_r_ack_ratio = 1;
 
 	return 0;
 }
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -323,10 +323,22 @@ int dccp_hdlr_seq_win(struct sock *sk, u
 
 int dccp_hdlr_ack_ratio(struct sock *sk, u64 ratio, bool rx)
 {
+#ifndef __CCID2_COPES_GRACEFULLY_WITH_DYNAMIC_ACK_RATIO_UPDATES__
+	/*
+	 * FIXME: This hack is required to remain bug-compatible with CCID2.
+	 * Using Ack Ratios > 1 lead to hangups and long RTO timeouts
+	 * (1..3 seconds). CCID2 code needs to be fixed first before being
+	 * able to use dynamic updates of Ack Ratio.
+	 */
+	DCCP_WARN("Not changing %s Ack Ratio from 1 to %u\n", rx ? "RX" : "TX",
+		  (u16)ratio);
+	dccp_sk(sk)->dccps_l_ack_ratio = dccp_sk(sk)->dccps_r_ack_ratio = 1;
+#else
 	if (rx)
 		dccp_sk(sk)->dccps_r_ack_ratio = ratio;
 	else
 		dccp_sk(sk)->dccps_l_ack_ratio = ratio;
+#endif
 	return 0;
 }
 
--- a/Documentation/networking/dccp.txt
+++ b/Documentation/networking/dccp.txt
@@ -144,7 +144,9 @@ send_ackvec = 1
 	Whether or not to send Ack Vector options (sec. 11.5).
 
 ack_ratio = 2
-	The default Ack Ratio (sec. 11.3) to use.
+	The default local (sender) Ack Ratio (sec. 11.3). This will only be used
+	if the active TX CCID supports it (currently only CCID2). The receiver
+	Ack Ratio is set automatically from the sender Ack Ratio of the	peer.
 
 seq_window = 100
 	The initial sequence window (sec. 7.5.2) of the sender. This influences

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 5/5]: Use feature-negotiation to report Ack Ratio changes
  2007-10-04 14:02 [PATCH 5/5]: Use feature-negotiation to report Ack Ratio changes Gerrit Renker
@ 2007-10-05  7:04 ` Ian McDonald
  0 siblings, 0 replies; 2+ messages in thread
From: Ian McDonald @ 2007-10-05  7:04 UTC (permalink / raw)
  To: dccp

On 10/5/07, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> [CCID2]: Use feature-negotiation to report Ack Ratio changes
>
> This uses the new feature-negotiation framework to signal Ack Ratio changes,
> as required by RFC 4341, sec. 6.1.2.
>
> This raises some problems for CCID2 since it can at the moment not cope grace-
> fully with Ack Ratio of e.g. 2. A FIXME has thus been added which reverts to
> the previous policy of bypassing the Ack Ratio sysctl.
>
> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>

Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-05  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-04 14:02 [PATCH 5/5]: Use feature-negotiation to report Ack Ratio changes Gerrit Renker
2007-10-05  7:04 ` Ian McDonald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox