Fixed bug with Nagel Congestion Avoidance where a tcp connection would

stall unnecessarily - always send an ACK when a packet len of < mss is
received.
This commit is contained in:
David Greenman 1994-08-01 12:00:25 +00:00
parent ba582a82b0
commit b164106fa7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1812
2 changed files with 38 additions and 2 deletions

View File

@ -491,7 +491,17 @@ findpcb:
m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr);
sbappend(&so->so_rcv, m);
sorwakeup(so);
tp->t_flags |= TF_DELACK;
/*
* If this is a small packet, then ACK now - with Nagel
* congestion avoidance sender won't send more until
* he gets an ACK.
*/
if ((unsigned)ti->ti_len < tp->t_maxseg) {
tp->t_flags |= TF_ACKNOW;
tcp_output(tp);
} else {
tp->t_flags |= TF_DELACK;
}
return;
}
}
@ -1263,6 +1273,14 @@ dodata: /* XXX */
if (so->so_options & SO_DEBUG)
tcp_trace(TA_INPUT, ostate, tp, &tcp_saveti, 0);
/*
* If this is a small packet, then ACK now - with Nagel
* congestion avoidance sender won't send more until
* he gets an ACK.
*/
if (ti->ti_len && ((unsigned)ti->ti_len < tp->t_maxseg))
tp->t_flags |= TF_ACKNOW;
/*
* Return any desired output.
*/

View File

@ -491,7 +491,17 @@ findpcb:
m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr);
sbappend(&so->so_rcv, m);
sorwakeup(so);
tp->t_flags |= TF_DELACK;
/*
* If this is a small packet, then ACK now - with Nagel
* congestion avoidance sender won't send more until
* he gets an ACK.
*/
if ((unsigned)ti->ti_len < tp->t_maxseg) {
tp->t_flags |= TF_ACKNOW;
tcp_output(tp);
} else {
tp->t_flags |= TF_DELACK;
}
return;
}
}
@ -1263,6 +1273,14 @@ dodata: /* XXX */
if (so->so_options & SO_DEBUG)
tcp_trace(TA_INPUT, ostate, tp, &tcp_saveti, 0);
/*
* If this is a small packet, then ACK now - with Nagel
* congestion avoidance sender won't send more until
* he gets an ACK.
*/
if (ti->ti_len && ((unsigned)ti->ti_len < tp->t_maxseg))
tp->t_flags |= TF_ACKNOW;
/*
* Return any desired output.
*/