Page MenuHomeFreeBSD

Bump so_options storage from "short" to "int" to match optname argument type in get/setsockopt system calls
AbandonedPublic

Authored by sobomax on Nov 19 2016, 5:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 6, 10:42 AM
Unknown Object (File)
Apr 25 2024, 9:43 PM
Unknown Object (File)
Apr 25 2024, 9:43 PM
Unknown Object (File)
Apr 25 2024, 9:43 PM
Unknown Object (File)
Mar 13 2024, 3:20 AM
Unknown Object (File)
Mar 13 2024, 3:20 AM
Unknown Object (File)
Feb 11 2024, 11:00 AM
Unknown Object (File)
Feb 11 2024, 9:10 AM
Subscribers

Details

Reviewers
freebsd-net-list
Group Reviewers
transport
Summary

Current storage format for the so_options is short and we are already have 16 options defined, which makes it impossible to add new and experimental options. There is very little sense to save 2 bytes of memory per socket in 2016, hence this change.

This also fixes small type mismatch in the related field tw_so_options, which somehow is defined "unsigned" for no obvious reasons that might cause various weird bugs in expressions and such.

Test Plan

I've run world and kernel (GENERIC) twice one with this change and one without. No errors or new warnings, so it looks good.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 6004

Event Timeline

sobomax retitled this revision from to Bump so_options storage from "short" to "int" to match optname argument type in get/setsockopt system calls.
sobomax updated this object.
sobomax edited the test plan for this revision. (Show Details)
sobomax added a reviewer: freebsd-net-list.
sobomax set the repository for this revision to rS FreeBSD src repository - subversion.
sobomax edited edge metadata.

Not necessary it turns out.