Page MenuHomeFreeBSD

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

Authored by glebius on Oct 26 2021, 4:04 AM.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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