Page MenuHomeFreeBSD

socket: Tag all socket option comments consistently
ClosedPublic

Authored by imp on Jun 12 2026, 5:02 AM.
Tags
None
Referenced Files
F164577291: D57545.id179637.diff
Sun, Aug 2, 4:32 AM
F164558666: D57545.id.diff
Sun, Aug 2, 2:23 AM
F164554156: D57545.id179740.diff
Sun, Aug 2, 1:49 AM
F164524882: D57545.id179637.diff
Sat, Aug 1, 6:59 PM
F164491370: D57545.id179930.diff
Sat, Aug 1, 9:01 AM
F164486824: D57545.diff
Sat, Aug 1, 8:20 AM
Unknown Object (File)
Thu, Jul 30, 5:51 PM
Unknown Object (File)
Tue, Jul 28, 11:18 AM

Details

Summary

For all the socket options that have a fixed type, add the type of the
socket option arg to the comment. Most of them already had this, but a
few did not. The ones that don't have a tag use a variable length data
structure of some kind, and are beyond the scope of this commit.

Sponsored by: Netflix

Diff Detail

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

Event Timeline

imp requested review of this revision.Jun 12 2026, 5:02 AM
tuexen added a subscriber: tuexen.

What about the IPPROTO_SCTP and IPPROTO_UDPLITE-level socket options?

This revision is now accepted and ready to land.Jun 12 2026, 10:05 AM
pouria added inline comments.
sys/netinet6/in6.h
433

Why not fixing it?

peter.lei_ieee.org added inline comments.
sys/netinet/tcp.h
226

This could be struct tcp_fastopen: min size is an int but a full struct may be set. A get returns an int -- so, not sure if that falls into "variable length"

228–229

This can be struct tcp_function_set which is a fixed size struct.

229–230

Same here: struct tcp_function_set is fixed size.

a number of these are things I introduced, no objection

Some tweaks found while auditing the result.

This revision now requires review to proceed.Jun 14 2026, 4:32 PM

I can take care of UDPLite and SCTP in a separate commit.

This revision is now accepted and ready to land.Jun 14 2026, 4:44 PM
sys/netinet6/in6.h
433

Nice catch! Thanks.

I can take care of UDPLite and SCTP in a separate commit.

Excellent! Thanks!