mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 10:40:19 -04:00
tcp_hpts: refactor the per tcpcb call to either input/output method
Either input or output return unlocked on failure. Should be no functional change. Reviewed by: rrs Differential Revision: https://reviews.freebsd.org/D47925
This commit is contained in:
parent
2ef97d8b75
commit
3604a050ee
1 changed files with 10 additions and 14 deletions
|
|
@ -1374,24 +1374,20 @@ again:
|
|||
* 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.
|
||||
*
|
||||
* XXXGL: some KPI abuse here. tfb_do_queued_segments
|
||||
* returns unlocked with positive error (always 1) and
|
||||
* tcp_output returns unlocked with negative error.
|
||||
*/
|
||||
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);
|
||||
/*
|
||||
* 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;
|
||||
} else
|
||||
!STAILQ_EMPTY(&tp->t_inqueue))
|
||||
error = -(*tp->t_fb->tfb_do_queued_segments)(tp,
|
||||
0);
|
||||
else
|
||||
error = tcp_output(tp);
|
||||
if (error < 0)
|
||||
goto skip_pacing;
|
||||
INP_WUNLOCK(inp);
|
||||
skip_pacing:
|
||||
if (__predict_true(error >= 0))
|
||||
INP_WUNLOCK(inp);
|
||||
CURVNET_RESTORE();
|
||||
}
|
||||
if (seen_endpoint) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue