All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] [PATCH 1/2]: Remove small typo
@ 2006-11-28 14:34 Gerrit Renker
  2006-11-28 19:26 ` Ian McDonald
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Gerrit Renker @ 2006-11-28 14:34 UTC (permalink / raw)
  To: dccp

[CCID 3]: Remove small typo

This removes a small typo introduced by an earlier patch.

===> It is sent as RFC since it would be a much better idea to
       revise this so that the nofeedback timer expires after 
             max(4*R, 2 * s/X) 
       instead of after 
        max(t_rto, 2 * s/X)  =  max(max(4*R, 1 second), 2 *s/X)
       as is currently the case.

===> Advantage:
           * the current solution is non-standard
           * simulation experience suggest that  max(4*R, 2 * s/X)
             is better, especially if R is small

===>  OK with this suggestion?


Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
 net/dccp/ccids/ccid3.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -246,7 +246,7 @@ static void ccid3_hc_tx_no_feedback_time
 		}
 		/*
 		 * Schedule no feedback timer to expire in
-		 * max(4 * t_RTO, 2 * s/X)  =  max(4 * t_RTO, 2 * t_ipi)
+		 * max(t_RTO, 2 * s/X)  =  max(t_RTO, 2 * t_ipi)
 		 * XXX This is non-standard, RFC 3448, 4.3 uses 4 * R
 		 */
 		next_tmout = max(hctx->ccid3hctx_t_rto, 2*hctx->ccid3hctx_t_ipi);
@@ -523,7 +523,7 @@ static void ccid3_hc_tx_packet_recv(stru
 					      	   USEC_PER_SEC            );
 		/*
 		 * Schedule no feedback timer to expire in
-		 * max(4 * t_RTO, 2 * s/X)  =  max(4 * t_RTO, 2 * t_ipi)
+		 * max(t_RTO, 2 * s/X)  =  max(t_RTO, 2 * t_ipi)
 		 * XXX This is non-standard, RFC 3448, 4.3 uses 4 * R
 		 */
 		next_tmout = max(hctx->ccid3hctx_t_rto, 2*hctx->ccid3hctx_t_ipi);

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

* Re: [RFC] [PATCH 1/2]: Remove small typo
  2006-11-28 14:34 [RFC] [PATCH 1/2]: Remove small typo Gerrit Renker
@ 2006-11-28 19:26 ` Ian McDonald
  2006-11-28 20:21 ` Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ian McDonald @ 2006-11-28 19:26 UTC (permalink / raw)
  To: dccp

On 11/29/06, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> [CCID 3]: Remove small typo
>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
-- 
Ian McDonald
Web: http://wand.net.nz/~iam4
Blog: http://imcdnzl.blogspot.com
WAND Network Research Group
Department of Computer Science
University of Waikato
New Zealand

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

* Re: [RFC] [PATCH 1/2]: Remove small typo
  2006-11-28 14:34 [RFC] [PATCH 1/2]: Remove small typo Gerrit Renker
  2006-11-28 19:26 ` Ian McDonald
@ 2006-11-28 20:21 ` Arnaldo Carvalho de Melo
  2006-11-28 20:25 ` Gerrit Renker
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2006-11-28 20:21 UTC (permalink / raw)
  To: dccp

On 11/28/06, Ian McDonald <ian.mcdonald@jandi.co.nz> wrote:
> On 11/29/06, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> > [CCID 3]: Remove small typo
> >
> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>

Thanks, applied.

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

* Re: [RFC] [PATCH 1/2]: Remove small typo
  2006-11-28 14:34 [RFC] [PATCH 1/2]: Remove small typo Gerrit Renker
  2006-11-28 19:26 ` Ian McDonald
  2006-11-28 20:21 ` Arnaldo Carvalho de Melo
@ 2006-11-28 20:25 ` Gerrit Renker
  2006-11-28 20:27 ` Ian McDonald
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Gerrit Renker @ 2006-11-28 20:25 UTC (permalink / raw)
  To: dccp

This is a Re-sent after discusssion with Ian. I have renamed
the variable also, as the term got too long for the 80 columns fixed
linelength - hope `t_nfb' is ok as mnemonic for the nofeedback timeout.

-----------------------> Commit Message <----------------------------
[CCID 3]: Set NoFeedback Timeout according to RFC 3448

This corrects the setting of the nofeedback timer with 
regard to RFC 3448 - previously it was not set to 
max(4*R, 2*s/X) as specified. Using the maximum of 1 second 
as upper bound (as it was done before) can have detrimental
effects, especially if R is small.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
 net/dccp/ccids/ccid3.c |   22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -183,7 +183,7 @@ static void ccid3_hc_tx_no_feedback_time
 {
 	struct sock *sk = (struct sock *)data;
 	struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
-	unsigned long next_tmout = USEC_PER_SEC / 5;
+	unsigned long t_nfb = USEC_PER_SEC / 5;
 
 	bh_lock_sock(sk);
 	if (sock_owned_by_user(sk)) {
@@ -208,7 +208,7 @@ static void ccid3_hc_tx_no_feedback_time
 			       hctx->ccid3hctx_x);
 		/* The value of R is still undefined and so we can not recompute
 		 * the timout value. Keep initial value as per [RFC 4342, 5]. */
-		next_tmout = TFRC_INITIAL_TIMEOUT;
+		t_nfb = TFRC_INITIAL_TIMEOUT;
 		ccid3_update_send_time(hctx);
 		break;
 	case TFRC_SSTATE_FBACK:
@@ -246,10 +246,9 @@ static void ccid3_hc_tx_no_feedback_time
 		}
 		/*
 		 * Schedule no feedback timer to expire in
-		 * max(4 * t_RTO, 2 * s/X)  =  max(4 * t_RTO, 2 * t_ipi)
-		 * XXX This is non-standard, RFC 3448, 4.3 uses 4 * R
+		 * max(4 * R, 2 * s/X)  =  max(4 * R, 2 * t_ipi)
 		 */
-		next_tmout = max(hctx->ccid3hctx_t_rto, 2*hctx->ccid3hctx_t_ipi);
+		t_nfb = max(4 * hctx->ccid3hctx_rtt, 2 * hctx->ccid3hctx_t_ipi);
 		break;
 	case TFRC_SSTATE_NO_SENT:
 		DCCP_BUG("Illegal %s state NO_SENT, sk=%p", dccp_role(sk), sk);
@@ -262,7 +261,7 @@ static void ccid3_hc_tx_no_feedback_time
 
 restart_timer:
 	sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer,
-		           jiffies + usecs_to_jiffies(next_tmout));
+		           jiffies + usecs_to_jiffies(t_nfb));
 out:
 	bh_unlock_sock(sk);
 	sock_put(sk);
@@ -420,7 +419,7 @@ static void ccid3_hc_tx_packet_recv(stru
 	struct ccid3_options_received *opt_recv;
 	struct dccp_tx_hist_entry *packet;
 	struct timeval now;
-	unsigned long next_tmout; 
+	unsigned long t_nfb;
 	u32 t_elapsed;
 	u32 pinv;
 	u32 r_sample;
@@ -523,18 +522,17 @@ static void ccid3_hc_tx_packet_recv(stru
 					      	   USEC_PER_SEC            );
 		/*
 		 * Schedule no feedback timer to expire in
-		 * max(4 * t_RTO, 2 * s/X)  =  max(4 * t_RTO, 2 * t_ipi)
-		 * XXX This is non-standard, RFC 3448, 4.3 uses 4 * R
+		 * max(4 * R, 2 * s/X)  =  max(4 * R, 2 * t_ipi)
 		 */
-		next_tmout = max(hctx->ccid3hctx_t_rto, 2*hctx->ccid3hctx_t_ipi);
+		t_nfb = max(4 * hctx->ccid3hctx_rtt, 2 * hctx->ccid3hctx_t_ipi);
 			
 		ccid3_pr_debug("%s, sk=%p, Scheduled no feedback timer to "
 			       "expire in %lu jiffies (%luus)\n",
 			       dccp_role(sk), sk,
-			       usecs_to_jiffies(next_tmout), next_tmout); 
+			       usecs_to_jiffies(t_nfb), t_nfb);
 
 		sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer, 
-				   jiffies + usecs_to_jiffies(next_tmout));
+				   jiffies + usecs_to_jiffies(t_nfb));
 
 		/* set idle flag */
 		hctx->ccid3hctx_idle = 1;   

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

* Re: [RFC] [PATCH 1/2]: Remove small typo
  2006-11-28 14:34 [RFC] [PATCH 1/2]: Remove small typo Gerrit Renker
                   ` (2 preceding siblings ...)
  2006-11-28 20:25 ` Gerrit Renker
@ 2006-11-28 20:27 ` Ian McDonald
  2006-11-28 20:28 ` Arnaldo Carvalho de Melo
  2006-11-28 20:35 ` Arnaldo Carvalho de Melo
  5 siblings, 0 replies; 7+ messages in thread
From: Ian McDonald @ 2006-11-28 20:27 UTC (permalink / raw)
  To: dccp

On 11/29/06, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> This is a Re-sent after discusssion with Ian. I have renamed
> the variable also, as the term got too long for the 80 columns fixed
> linelength - hope `t_nfb' is ok as mnemonic for the nofeedback timeout.
>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
-- 
Ian McDonald
Web: http://wand.net.nz/~iam4
Blog: http://imcdnzl.blogspot.com
WAND Network Research Group
Department of Computer Science
University of Waikato
New Zealand

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

* Re: [RFC] [PATCH 1/2]: Remove small typo
  2006-11-28 14:34 [RFC] [PATCH 1/2]: Remove small typo Gerrit Renker
                   ` (3 preceding siblings ...)
  2006-11-28 20:27 ` Ian McDonald
@ 2006-11-28 20:28 ` Arnaldo Carvalho de Melo
  2006-11-28 20:35 ` Arnaldo Carvalho de Melo
  5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2006-11-28 20:28 UTC (permalink / raw)
  To: dccp

On Tue, Nov 28, 2006 at 08:25:00PM +0000, Gerrit Renker wrote:
> This is a Re-sent after discusssion with Ian. I have renamed
> the variable also, as the term got too long for the 80 columns fixed
> linelength - hope `t_nfb' is ok as mnemonic for the nofeedback timeout.
> 

Ok, I'll retract the other one and apply this one instead

- Arnaldo

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

* Re: [RFC] [PATCH 1/2]: Remove small typo
  2006-11-28 14:34 [RFC] [PATCH 1/2]: Remove small typo Gerrit Renker
                   ` (4 preceding siblings ...)
  2006-11-28 20:28 ` Arnaldo Carvalho de Melo
@ 2006-11-28 20:35 ` Arnaldo Carvalho de Melo
  5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2006-11-28 20:35 UTC (permalink / raw)
  To: dccp

On Tue, Nov 28, 2006 at 06:28:14PM -0200, Arnaldo Carvalho de Melo wrote:
> On Tue, Nov 28, 2006 at 08:25:00PM +0000, Gerrit Renker wrote:
> > This is a Re-sent after discusssion with Ian. I have renamed
> > the variable also, as the term got too long for the 80 columns fixed
> > linelength - hope `t_nfb' is ok as mnemonic for the nofeedback timeout.
> > 
> 
> Ok, I'll retract the other one and apply this one instead

Done, thanks

- Arnaldo

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

end of thread, other threads:[~2006-11-28 20:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-28 14:34 [RFC] [PATCH 1/2]: Remove small typo Gerrit Renker
2006-11-28 19:26 ` Ian McDonald
2006-11-28 20:21 ` Arnaldo Carvalho de Melo
2006-11-28 20:25 ` Gerrit Renker
2006-11-28 20:27 ` Ian McDonald
2006-11-28 20:28 ` Arnaldo Carvalho de Melo
2006-11-28 20:35 ` Arnaldo Carvalho de Melo

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.