* 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. */
| 3978 | * be started again. |
| 3979 | */ |
| 3980 | void |
| 3981 | tcp_newreno_partial_ack(struct tcpcb *tp, struct tcphdr *th) |
| 3982 | { |
| 3983 | tcp_seq onxt = tp->snd_nxt; |
| 3984 | uint32_t ocwnd = tp->snd_cwnd; |
| 3985 | u_int maxseg = tcp_maxseg(tp); |
| 3986 | |
| 3987 | INP_WLOCK_ASSERT(tp->t_inpcb); |
| 3988 | |
| 3989 | tcp_timer_activate(tp, TT_REXMT, 0); |
| 3990 | tp->t_rtttime = 0; |
| 3991 | tp->snd_nxt = th->th_ack; |
| 3992 | /* |
| 3993 | * Set snd_cwnd to one segment beyond acknowledged offset. |
| 3994 | * (tp->snd_una has not yet been updated when this function is called.) |
| 3995 | */ |
| 3996 | tp->snd_cwnd = maxseg + BYTES_THIS_ACK(tp, th); |
| 3997 | tp->t_flags |= TF_ACKNOW; |
| 3998 | (void) tp->t_fb->tfb_tcp_output(tp); |
| 3999 | tp->snd_cwnd = ocwnd; |
| 4000 | if (SEQ_GT(onxt, tp->snd_nxt)) |
| 4001 | tp->snd_nxt = onxt; |
| 4002 | /* |
| 4003 | * Partial window deflation. Relies on fact that tp->snd_una |
| 4004 | * not updated yet. |
| 4005 | */ |
| 4006 | if (tp->snd_cwnd > BYTES_THIS_ACK(tp, th)) |
| 4007 | tp->snd_cwnd -= BYTES_THIS_ACK(tp, th); |
| 4008 | else |
| 4009 | tp->snd_cwnd = 0; |
| 4010 | tp->snd_cwnd += maxseg; |
| 4011 | } |
| 4012 | |
| 4013 | int |
| 4014 | tcp_compute_pipe(struct tcpcb *tp) |
no test coverage detected