Page MenuHomeFreeBSD

tcp: TCP output method can request tcp_drop
ClosedPublic

Authored by glebius on Dec 10 2021, 2:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 10:28 AM
Unknown Object (File)
Sat, Apr 27, 10:27 AM
Unknown Object (File)
Sat, Apr 27, 10:18 AM
Unknown Object (File)
Sat, Apr 27, 9:02 AM
Unknown Object (File)
Fri, Apr 12, 5:17 AM
Unknown Object (File)
Feb 27 2024, 9:51 AM
Unknown Object (File)
Feb 22 2024, 1:21 AM
Unknown Object (File)
Feb 21 2024, 2:57 PM

Details

Summary

The advanced TCP stacks (bbr, rack) may decide to drop a TCP connection
when they do output on it. The default stack never does this, thus
existing framework expects tcp_output() always to return locked and
valid tcpcb.

Provide KPI extension to satisfy demands of advanced stacks. If the
output method returns negative error code, it means that caller must
call tcp_drop().

In tcp_var() provide three inline methods to call tcp_output():

  • tcp_output() is a drop-in replacement for the default stack, so that default stack can continue using it internally without modifications. For advanced stacks it would perform tcp_drop() and unlock and report that with negative error code.
  • tcp_output_unlock() handles the negative code and always converts it to positive and always unlocks.
  • tcp_output_nodrop() just calls the method and leaves the responsibility to drop on the caller.

Sweep over the advanced stacks and use new KPI instead of using HPTS
delayed drop queue for that.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43319
Build 40207: arc lint + arc unit

Event Timeline

tuexen added a subscriber: tuexen.

You might want to check what rrs@ thinks...

This revision is now accepted and ready to land.Dec 10 2021, 12:05 PM

Fix a bug, rebase, update descr.

This revision now requires review to proceed.Dec 13 2021, 6:15 PM
This revision is now accepted and ready to land.Dec 27 2021, 12:13 AM