This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FreeBSD TCP retransmissions


Attached patch implements tcp_rexmit_min (copied from
FreeBSD) and tcp_rexmit_shift_max (no FreeBSD support.
 Originated by me).

///////////////////////////////////////////
SYSCTL output

INFO:<4 2 6 107 = net.inet.tcp.newreno (INT Read Write
){6}>
INFO:<4 2 6 108 = net.inet.tcp.msl (INT Read Write
){6}>
INFO:<4 2 6 109 = net.inet.tcp.always_keepalive (INT
Read Write ){6}>
INFO:<4 2 6 110 = net.inet.tcp.rexmit_min (INT Read
Write ){6}>
INFO:<4 2 6 111 = net.inet.tcp.rexmit_shift_max (INT
Read Write ){6}>
INFO:<4 2 6 112 = net.inet.tcp.tcbhashsize (INT Read
){6}>
INFO:<4 2 6 113 = net.inet.tcp.do_tcpdrain (INT Read
Write ){6}>
INFO:<4 2 6 114 = net.inet.tcp.pcbcount (INT Read
){6}>
INFO:<4 2 6 115 = net.inet.tcp.icmp_may_rst (INT Read
Write ){6}>
INFO:<4 2 6 116 = net.inet.tcp.strict_rfc1948 (INT
Read Write ){6}>
INFO:<4 2 6 117 = net.inet.tcp.isn_reseed_interval
(INT Read Write ){6}>

////////////////////////////////////////////////////////////////

eCos
i386-elf:(~/ecos/packages/net/bsd_tcpip/current/include/netinet)cvs
diff tcp_timer.h
Index: tcp_timer.h
===================================================================
RCS file:
/ienrcs/cvsintact/ecos/packages/net/bsd_tcpip/current/include/netinet/tcp_timer.h,v
retrieving revision 1.1
diff -r1.1 tcp_timer.h
147a148,149
> extern int tcp_rexmit_min;       /* min time between
retransmissions */
> extern int tcp_rexmit_shift_max; /* maximum
retransmission attempts */
eCos
i386-elf:(~/ecos/packages/net/bsd_tcpip/current/include/netinet)

//////////////////////////////////////////////////////////////////

eCos
i386-elf:(~/ecos/packages/net/bsd_tcpip/current/src/sys/netinet)cvs
diff tcp_output.c
Index: tcp_output.c
===================================================================
RCS file:
/ienrcs/cvsintact/ecos/packages/net/bsd_tcpip/current/src/sys/netinet/tcp_output.c,v
retrieving revision 1.2
diff -r1.2 tcp_output.c
946c946
<       if (tp->t_rxtshift < TCP_MAXRXTSHIFT)
---
>       if (tp->t_rxtshift < tcp_rexmit_shift_max)

////////////////////////////////////////////////////////////////////

eCos
i386-elf:(~/ecos/packages/net/bsd_tcpip/current/src/sys/netinet)cvs
diff tcp_subr.c
Index: tcp_subr.c
===================================================================
RCS file:
/ienrcs/cvsintact/ecos/packages/net/bsd_tcpip/current/src/sys/netinet/tcp_subr.c,v
retrieving revision 1.2
diff -r1.2 tcp_subr.c
155c155
<
---
>
207a208
>       tcp_rexmit_min = TCPTV_MIN;
547c548
<       tp->t_rttmin = TCPTV_MIN;
---
>       tp->t_rttmin = tcp_rexmit_min;
eCos
i386-elf:(~/ecos/packages/net/bsd_tcpip/current/src/sys/netinet)


////////////////////////////////////////////////////////////////////


eCos
i386-elf:(~/ecos/packages/net/bsd_tcpip/current/src/sys/netinet)cvs
diff tcp_timer.c
Index: tcp_timer.c
===================================================================
RCS file:
/ienrcs/cvsintact/ecos/packages/net/bsd_tcpip/current/src/sys/netinet/tcp_timer.c,v
retrieving revision 1.2
diff -r1.2 tcp_timer.c
103a104,123
> static int
> sysctl_rexmitmax_rangecheck(SYSCTL_HANDLER_ARGS)
> {
>       int error, tt;
>
>       tt = *(int *)oidp->oid_arg1;
>
>       error = sysctl_handle_int(oidp, &tt, 0, req);
>       if (error || !req->newptr)
>               return (error);
>
>       if (tt > TCP_MAXRXTSHIFT)
>               return (EINVAL);
>
>       if (tt < 2)
>               return (EINVAL);
>
>       *(int *)oidp->oid_arg1 = tt;
>         return (0);
> }
128a149,156
>
> int   tcp_rexmit_min;
> SYSCTL_PROC(_net_inet_tcp, OID_AUTO, rexmit_min,
CTLTYPE_INT|CTLFLAG_RW,
>     &tcp_rexmit_min, 0, sysctl_msec_to_ticks, "I",
"Minimum retransmission timeout");
>
> int   tcp_rexmit_shift_max = TCP_MAXRXTSHIFT;
> SYSCTL_PROC(_net_inet_tcp, OID_AUTO,
rexmit_shift_max, CTLTYPE_INT|CTLFLAG_RW,
>     &tcp_rexmit_shift_max, 0,
sysctl_rexmitmax_rangecheck, "I", "Maximum TCP
retransmissions");
340c368
<       if (tp->t_rxtshift == TCP_MAXRXTSHIFT &&
---
>       if (tp->t_rxtshift == tcp_rexmit_shift_max &&
384,385c412,413
<       if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) {
<               tp->t_rxtshift = TCP_MAXRXTSHIFT;
---
>       if (++tp->t_rxtshift > tcp_rexmit_shift_max) {
>               tp->t_rxtshift = tcp_rexmit_shift_max;
429c457
<       if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
---
>       if (tp->t_rxtshift > tcp_rexmit_shift_max / 4)
{
eCos
i386-elf:(~/ecos/packages/net/bsd_tcpip/current/src/sys/netinet)

//////////////////////////////////////////////////////////////////////////

eCos
i386-elf:(~/ecos/packages/net/bsd_tcpip/current)cvs
diff ChangeLog
Index: ChangeLog
===================================================================
RCS file:
/ienrcs/cvsintact/ecos/packages/net/bsd_tcpip/current/ChangeLog,v
retrieving revision 1.1
diff -r1.1 ChangeLog
0a1,12
> 2003-10-28  Matt Jerdonek  <maj1224@yahoo.com>
>
>       * src/sys/netinet/tcp_output.c
(tcp_setpersist): Use variable
>       tcp_rexmit_shift_max instead of
TCP_MAXRXTSHIFT
>       * src/sys/netinet/tcp_subr.c (tcp_newtcpcb):
Add FreeBSD
>       changes to control minimum retransmit time
>       * src/sys/netinet/tcp_timer.c : Use variable
tcp_rexmit_shift_max
>       instead of TCP_MAXRXTSHIFT.  Also add FreeBSD
changes to control
>       minimum retransmit time
>       * include/netinet/tcp_timer.h : Add external
declarations to
>       support above.
>
eCos i386-elf:(~/ecos/packages/net/bsd_tcpip/current)



__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]