Subject: RSVP peak rate bug in linux

From: Gustavo Carneiro <[email-masked]>
Date: 21 Jun 2002 18:36:39 +0100

isi rsvpd 4.2a4 + Linux TC doesn't seem handle peak rates (the 'p'
parameter) correctly. I made a couple of test programs, in attachment.
Normally I get:
  The Sender:
[spectrum:test-arrows]$ ./test-sender 
tspec:
T=[4K(1.14K) 5.7KB/s 64 570]
Sent packet 00000000
Sent packet 00000001
Sent packet 00000002
  (...)

[gjc@glyph test-arrows]$ ./test-receiver 
Session established (sid=1).
flowspec:
[G R=4K S=10K T=[4K(1.14K) 5.7KB/s 64 570]]
reserve error: 0
Entering event loop.
event_callback: event_type = 1
RAPI_RESV_ERROR !!!

 When I apply this change:
diff -u -r test-rsvpd-linux-error/test-receiver.c test-rsvpd-linux-ok/test-receiver.c
--- test-rsvpd-linux-error/test-receiver.c	Fri Jun 21 18:22:16 2002
+++ test-rsvpd-linux-ok/test-receiver.c	Fri Jun 21 18:26:41 2002
@@ -108,7 +108,7 @@
     init_flowspec_IS_G(&flowspec,
 		       4000,	/* r */
 		       2*MTU,	/* b */
-		       10*MTU,	/* p */
+		       0*MTU,	/* p */
 		       64,		/* m */
 		       MTU,	/* M */
 		       4000,	/* R */
diff -u -r test-rsvpd-linux-error/test-sender.c test-rsvpd-linux-ok/test-sender.c
--- test-rsvpd-linux-error/test-sender.c	Fri Jun 21 18:22:22 2002
+++ test-rsvpd-linux-ok/test-sender.c	Fri Jun 21 18:26:19 2002
@@ -116,7 +116,7 @@
     init_tspec_IS(&sender_tspec,
 		  4000,		/* r */
 		  2*MTU,	/* b */
-		  10*MTU,	/* p */
+		  0*MTU,	/* p */
 		  64,		/* m */
 		  MTU);	/* M */
 	
,  get this for the receiver:

[gjc@glyph test-arrows]$ ./test-receiver 
Session established (sid=1).
flowspec:
[G R=4K S=10K T=[4K(1.14K) 0B/s 64 570]]
reserve error: 0
Entering event loop.
event_callback: event_type = 1
event_callback: event_type = 5

 (the last event is RAPI_RESV_CONFIRM).

  So, there is a bug in either in rsvpd or its Linux TC module.
  Any help is appreciated on how to solve this.

-- 
Gustavo João Alves Marques Carneiro
<[email-masked]> <[email-masked]>

---

From: [email-masked]
Date: Fri, 21 Jun 2002 21:39:31 +0400 (MSD)

Hello!

> +		       0*MTU,	/* p */

p is _rate_, it cannot be 10*MTU, by the way. SO, parameters of reservation
are illegal.

Alexey

---

From: Gustavo Carneiro <[email-masked]>
Date: 21 Jun 2002 18:49:50 +0100

> p is _rate_, it cannot be 10*MTU, by the way. SO, parameters of reservation

  I made a small mistake. I meant to have p=10*r. But the final value is
more or less the same. I tested two cases, then: p=5700 and p=0. It only
works for p=0. The parameters of reservation are *legal*.
  Anyway, thanks for the very quick reply! :-)