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)
Mon, Dec 2, 5:08 AM
Unknown Object (File)
Oct 30 2024, 11:29 PM
Unknown Object (File)
Sep 9 2024, 11:20 PM
Unknown Object (File)
Aug 19 2024, 7:03 AM
Unknown Object (File)
Aug 15 2024, 8:08 AM
Unknown Object (File)
Aug 1 2024, 12:16 AM
Unknown Object (File)
Jul 30 2024, 1:31 AM
Unknown Object (File)
Jul 29 2024, 4:19 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