Page MenuHomeFreeBSD

sysctl net.inet.tcp.ktlslist: do not rely on global generation for ktls sessions
ClosedPublic

Authored by kib on Tue, Jun 24, 2:57 AM.
Tags
None
Referenced Files
F121944749: D51000.id157494.diff
Mon, Jun 30, 9:31 PM
Unknown Object (File)
Sun, Jun 29, 5:25 PM
Unknown Object (File)
Sun, Jun 29, 8:06 AM
Unknown Object (File)
Sat, Jun 28, 12:56 PM
Unknown Object (File)
Tue, Jun 24, 3:59 PM

Details

Summary
Disallow parallel executions for the sysctl, which makes it possible to
have the generation count for the sysctl requests itself instead of for the
sessions.  When the first pass over inpcbs is done, assign them the
request' gen count.  On the second pass, only externalize the inpcbs
with ktls sessions which gen count is equal to the current request.

This way, we can be sure that the second pass does not copy out more
inpcbs than was counted for in the first pass, while eliminating the
global atomic op during ktls session creation.

Requested by:   gallatin

Diff Detail

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

Event Timeline

kib requested review of this revision.Tue, Jun 24, 2:57 AM
markj added inline comments.
sys/netinet/tcp_subr.c
2695

Add a lock assertion here?

Thank you for moving to this solution, away from a global atomic.

This revision was not accepted when it landed; it landed in state Needs Review.Tue, Jun 24, 3:59 PM
This revision was automatically updated to reflect the committed changes.