[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [openss7] Test programs
Chuck,
Your problem is a bug in the sctp_rtt_calc function. I placed an ensure
statement
ensure( time < jiffies, return );
To avoid the two cases time >= jiffies where the calculated round trip
time would be negative or zero. I was really expecting to protect
against he negative case (which would indicate serious things), but
I believe that what is happening is that your packets are being returned
and rtt calcs performed UNDER THE GRANULARITY OF THE JIFFY CLOCK.
On Intel architectures, this is not too hard... The jiffie clock only
has a granularity 10ms. That means that you are getting RTTs of less
than 10ms (which is good).
The included patch to sctp_input.c will stop the logs and make the
rtt calculation more correct.
--Brian
Chuck Winters wrote: Mon, 11 Jun 2001 10:10:17
> Brian,
> I was trying to run you test programs on my machines, and I still get
> the same error in sctp_input.c where ensure(time < jiffies) fails. I
> tried recompiling the kernel several times. I even wiped out the
> sources, and started from scratch. I tried about 12 different
> compilations with different options. The last one, I just started with
> the standard configuration from redhat with SCTP compiled as a module
> and ISDN, IRDA, and Old CDROM drivers unchecked. Same thing. I also
> tried synchronizing the times on both machines with the same result. I
> am out of ideas. Attached is my kernel configuration file.
>
> Thanks,
> Chuck
> --
> Chuck Winters | Email: cwinters@atl.lmco.com
> Distributed Processing Laboratory | Phone: 856-338-3987
> Lockheed Martin Advanced Technology Labs |
> 1 Federal St - A&E-3W |
> Camden, NJ 08102 |
--
Brian F. G. Bidulock ¦ The reasonable man adapts himself to the ¦
bidulock@openss7.org ¦ world; the unreasonable one persists in ¦
http://www.openss7.org/ ¦ trying to adapt the world to himself. ¦
¦ Therefore all progress depends on the ¦
¦ unreasonable man. -- George Bernard Shaw ¦
Index: sctp_input.c
===================================================================
RCS file: /home/common/cvsroot/linux/net/ipv4/sctp_input.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -p -r1.40 -r1.41
*** sctp_input.c 2001/05/15 15:30:28 1.40
--- sctp_input.c 2001/06/11 16:58:36 1.41
***************
*** 1,6 ****
/*****************************************************************************
! @(#) $Id: sctp_input.c,v 1.40 2001/05/15 15:30:28 brian Exp $
-----------------------------------------------------------------------------
--- 1,6 ----
/*****************************************************************************
! @(#) $Id: sctp_input.c,v 1.41 2001/06/11 16:58:36 brian Exp $
-----------------------------------------------------------------------------
***************
*** 24,32 ****
-----------------------------------------------------------------------------
! Last Modified $Date: 2001/05/15 15:30:28 $ by $Author: brian $
$Log: sctp_input.c,v $
Revision 1.40 2001/05/15 15:30:28 brian
Pre-release version of OpenSS7 SCTP for Linux Native.
--- 24,35 ----
-----------------------------------------------------------------------------
! Last Modified $Date: 2001/06/11 16:58:36 $ by $Author: brian $
$Log: sctp_input.c,v $
+ Revision 1.41 2001/06/11 16:58:36 brian
+ Fixed RTT calc problem reported by Chuck Winters.
+
Revision 1.40 2001/05/15 15:30:28 brian
Pre-release version of OpenSS7 SCTP for Linux Native.
***************
*** 98,104 ****
*****************************************************************************/
! static char const ident[] = "$Name: $($Revision: 1.40 $) $Date: 2001/05/15 15:30:28 $";
/*
* ==========================================================================
--- 101,107 ----
*****************************************************************************/
! static char const ident[] = "$Name: $($Revision: 1.41 $) $Date: 2001/06/11 16:58:36 $";
/*
* ==========================================================================
*************** static __inline__ void sctp_rtt_calc(str
*** 129,135 ****
ensure( sd, return );
ensure( time, return );
! ensure( time < jiffies, return );
/* RFC 2960 6.3.1 */
rtt = jiffies - time;
--- 132,138 ----
ensure( sd, return );
ensure( time, return );
! ensure( time <= jiffies, return );
/* RFC 2960 6.3.1 */
rtt = jiffies - time;
*************** static __inline__ void sctp_rtt_calc(str
*** 140,145 ****
--- 143,150 ----
sd->rttvar = sd->rttvar - (sd->rttvar>>2) + (abs(sd->srtt - rtt)>>2);
sd->srtt = sd->srtt - (sd->srtt>>3) + (rtt>>3);
sd->rto = rtt + (sd->rttvar<<2);
+ /* RFC 2960 6.3.1 (G1) */
+ sd->rttvar = max(sd->rttvar, 1);
}
else
{