Page MenuHomeFreeBSD

Pass down some IP level setsockopt()s into TCP stack(s)
ClosedPublic

Authored by glebius on Oct 26 2021, 4:04 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 20, 2:47 AM
Unknown Object (File)
Oct 5 2024, 9:23 PM
Unknown Object (File)
Oct 3 2024, 2:21 PM
Unknown Object (File)
Oct 3 2024, 9:19 AM
Unknown Object (File)
Oct 2 2024, 5:08 PM
Unknown Object (File)
Sep 30 2024, 1:33 AM
Unknown Object (File)
Sep 27 2024, 8:42 AM
Unknown Object (File)
Sep 24 2024, 12:55 PM
Subscribers

Details

Summary

This is addresses same problem D32600. There are some IP level
options that affect TCP. We already have a special handler
for IPV6_USE_MIN_MTU. Now we found out that rack may not notice
set of IP_TOS, IP_TTL and IPV6_TCLASS.

The code around is already someone messy, so there are several
preparatory commits here and then final commit that fixes rack.

This review has 5 commits in it:

  • 4e69e788d2da tcp: socket option to get stack alias name

    This one is absolutely unrelated, but is required to get us conflictless with Netflix tree, as the following changes also originate from Netflix. It shall be committed and pushed independently and not referencing this review. Its author is Peter Lei, not me.
  • a9eff5946ec3 Split tcp_ctloutput() into set/get parts.

    A preparatory NFC commit to untangle the code a bit.
  • 2dfa755054bc Several IP level socket options may affect TCP.

    Set up filters for mentioned IP/IP6 socket options.
  • adb6e540d541 Factor out tcp6_use_min_mtu() to handle IPV6_USE_MIN_MTU by TCP.

    Factor out IPV6_USE_MIN_MTU handling to be shared by stacks.
  • 35a45f25219c rack: Update the fast send block on setsockopt(2)

    Finally fix rack wrt to IP options change.

The commits can be viewed separately here: https://github.com/glebius/FreeBSD/commits/ip-opts-on-tcp

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rrs added a subscriber: rrs.

Gleb:

This method is fine, I will withdraw my fab in favor if this :)

R

This revision is now accepted and ready to land.Oct 26 2021, 4:28 PM