FreeBSD/sys/netinet/tcp_input.c
/*
 * On a partial ack arrives, force the retransmission of the
 * next unacknowledged segment.  Do not clear tp->t_dupacks.
 * By setting snd_nxt to ti_ack, this forces retransmission timer to
 * be started again.
 */
On a partial ack arrives, force the retransmission of the
next unacknowledged segment.  Do not clear tp->t_dupacks.
By setting snd_nxt to ti_ack, this forces retransmission timer to
be started again.
On a partial ack arrives force the retransmission of the next unacknowledged segment . Do not clear tp - > t_dupacks . By setting snd_nxt to ti_ack this forces retransmission timer to be started again .
void
tcp_newreno_partial_ack(struct tcpcb *tp, struct tcphdr *th)
{
	tcp_seq onxt = tp->snd_nxt;
	u_long ocwnd = tp->snd_cwnd;
	u_int maxseg = tcp_maxseg(tp);
	INP_WLOCK_ASSERT(tp->t_inpcb);
	tcp_timer_activate(tp, TT_REXMT, 0);
	tp->t_rtttime = 0;
	tp->snd_nxt = th->th_ack;
	tp->snd_cwnd = maxseg + BYTES_THIS_ACK(tp, th);
	tp->t_flags |= TF_ACKNOW;
	(void) tp->t_fb->tfb_tcp_output(tp);
	tp->snd_cwnd = ocwnd;
	if (SEQ_GT(onxt, tp->snd_nxt))
		tp->snd_nxt = onxt;
	if (tp->snd_cwnd > BYTES_THIS_ACK(tp, th))
		tp->snd_cwnd -= BYTES_THIS_ACK(tp, th);
	else
		tp->snd_cwnd = 0;
	tp->snd_cwnd += maxseg;
}
void tcp_newreno_partial_ack ( struct tcpcb * tp , struct tcphdr * th ) { tcp_seq onxt = tp -> snd_nxt ; u_long ocwnd = tp -> snd_cwnd ; u_int maxseg = tcp_maxseg ( tp ) ; INP_WLOCK_ASSERT ( tp -> t_inpcb ) ; tcp_timer_activate ( tp , TT_REXMT , 0 ) ; tp -> t_rtttime = 0 ; tp -> snd_nxt = th -> th_ack ; tp -> snd_cwnd = maxseg + BYTES_THIS_ACK ( tp , th ) ; tp -> t_flags |= TF_ACKNOW ; ( void ) tp -> t_fb -> tfb_tcp_output ( tp ) ; tp -> snd_cwnd = ocwnd ; if ( SEQ_GT ( onxt , tp -> snd_nxt ) ) tp -> snd_nxt = onxt ; if ( tp -> snd_cwnd > BYTES_THIS_ACK ( tp , th ) ) tp -> snd_cwnd -= BYTES_THIS_ACK ( tp , th ) ; else tp -> snd_cwnd = 0 ; tp -> snd_cwnd += maxseg ; }
On a partial ack arrives, force the retransmission of the
 next unacknowledged segment.
On a partial ack arrives force the retransmission of the next unacknowledged segment .
/*
	 * Set snd_cwnd to one segment beyond acknowledged offset.
	 * (tp->snd_una has not yet been updated when this function is called.)
	 */ /*
	 * Partial window deflation.  Relies on fact that tp->snd_una
	 * not updated yet.
	 */