Subject: TCP limited transmit
To: None <>
From: Mark Allman <>
List: tech-net
Date: 11/28/2000 13:36:34

A slight change to TCP's algorithms (called Limited Transmit) is in
the RFC Editor's queue and will be published as a proposed standard
soon.  The proposal basically calls for new data (if available) to
be transmitted when the first and second duplicate ACKs arrive.
Additional constraints are that cwnd is not supposed to be changed
and we need to ensure that we don't oversubscribe cwnd by more than

I have hacked together some changes for netbsd to implement this
change.  I'm not sure what I have is the Right Way to do things, but
it seems reasonable to me and it seems to work fine.  I thought I'd
submit these changes for possible inclusion in the standard version
of netbsd.

I added a "do_lim_xmit" global to allow turning the algorithm on and
off via sysctl.  I added a variable "t_extra" to the TCP control
block to track the amount of data we have sent beyond the cwnd.
Then, in tcp_input.c:

				} else if (tp->t_dupacks > tcprexmtthresh) {
					tp->snd_cwnd += tp->t_segsz;
					(void) tcp_output(tp);
					goto drop;
#ifdef MALLMAN
				/* limited transmit algorithm */
				} else if (do_lim_xmit &&
					   (tp->t_extra < (2 * tp->t_segsz))) {
				    tp->t_extra += tp->t_segsz;
				    tp->snd_cwnd += tp->t_extra;
				    (void) tcp_output (tp);
				    tp->snd_cwnd -= tp->t_extra;
				    goto drop;
#endif MALLMAN

			} else {
				tp->t_dupacks = 0;
#ifdef MALLMAN
				tp->t_extra = 0;
#endif MALLMAN

Basically, I temporarily bump cwnd by enough to generate one extra
segment, send the segment and then deflate cwnd back down.  

Also note that everywhere that t_dupacks is set to zero, t_extra
should also be set to zero (as shown above).