mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
hpts: avoid duplicate call to tcp_output()
Obtained from: rrs
This commit is contained in:
parent
bf7830d79d
commit
08c33cd94d
|
@ -1364,18 +1364,23 @@ tcp_hptsi(struct tcp_hpts_entry *hpts, int from_callout)
|
|||
* We also only call tfb_do_queued_segments() <or>
|
||||
* tcp_output(). It is expected that if segments are
|
||||
* queued and come in that the final input mbuf will
|
||||
* cause a call to output if it is needed.
|
||||
* cause a call to output if it is needed so we do
|
||||
* not need a second call to tcp_output(). So we do
|
||||
* one or the other but not both.
|
||||
*/
|
||||
tp->t_flags2 |= TF2_HPTS_CALLS;
|
||||
if ((tp->t_flags2 & TF2_SUPPORTS_MBUFQ) &&
|
||||
!STAILQ_EMPTY(&tp->t_inqueue)) {
|
||||
error = (*tp->t_fb->tfb_do_queued_segments)(tp, 0);
|
||||
if (error) {
|
||||
/* The input killed the connection */
|
||||
/*
|
||||
* A non-zero return for input queue processing
|
||||
* is the lock is released and most likely the
|
||||
* inp is gone.
|
||||
*/
|
||||
if (error)
|
||||
goto skip_pacing;
|
||||
}
|
||||
}
|
||||
error = tcp_output(tp);
|
||||
} else
|
||||
error = tcp_output(tp);
|
||||
if (error < 0)
|
||||
goto skip_pacing;
|
||||
INP_WUNLOCK(inp);
|
||||
|
|
Loading…
Reference in a new issue