Page MenuHomeFreeBSD

Add functionality so you can optionally change a progressed socket to a new tcp stack
ClosedPublic

Authored by rrs on Jun 9 2016, 8:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 23 2024, 1:26 AM
Unknown Object (File)
Mar 3 2024, 11:25 AM
Unknown Object (File)
Jan 12 2024, 6:57 AM
Unknown Object (File)
Jan 12 2024, 12:47 AM
Unknown Object (File)
Dec 23 2023, 9:49 AM
Unknown Object (File)
Dec 23 2023, 9:48 AM
Unknown Object (File)
Dec 15 2023, 7:03 PM
Unknown Object (File)
Dec 1 2023, 7:21 AM
Subscribers

Details

Summary

The socket option to change stats only works with CLOSED sockets, we
need an option to allow a stack itself to dictate that yes, its ok to change or
no you can't. Also indicate in the fini() that the TCP is being destroyed or *not*

Test Plan

Have rack use this to actually change on the fly

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rrs retitled this revision from to Add functionality so you can optionally change a progressed socket to a new tcp stack.
rrs updated this object.
rrs edited the test plan for this revision. (Show Details)
rrs added reviewers: transport, hiren, jtl.
jtl edited edge metadata.

Looks good (with the one change we discussed; see reminder note).

Thanks!

netinet/tcp_usrreq.c
1430 ↗(On Diff #17477)

This changes the default behavior so you get an error when explicitly asking to use the same stack you are currently using. In certain cases, it might be expected. It might be worth leaving this as a no-op/non-error.

This revision is now accepted and ready to land.Jun 9 2016, 9:16 PM
rrs edited edge metadata.

Updated with change we discussed and also two bugs.. when you
do the lookup, a refcnt is incremented so if you were to stay
on the same one you need to release the refcnt (it gets to 2 in that case). And
also in one error path we need to do that (before the lookup was later).

This revision now requires review to proceed.Jun 11 2016, 9:50 AM
hiren edited edge metadata.

Thank you!

This revision is now accepted and ready to land.Jun 11 2016, 2:38 PM
jtl edited edge metadata.

Looks good. See inline style(9) nits. (You now know my philosophy on that. :-) )

sys/netinet/tcp_usrreq.c
1442 ↗(On Diff #17507)

style(9) nit: un-needed curly braces.
(Sorry!)

1465 ↗(On Diff #17507)

style(9) nit: un-needed curly braces. (Although I know this is already in the original. :-) )

jtl requested changes to this revision.Jun 28 2016, 1:52 PM
jtl edited edge metadata.

Now that the alternate stacks feature is documented (rS302247), please add documentation updates to this change.

Thanks!

This revision now requires changes to proceed.Jun 28 2016, 1:52 PM

I had not noticed your man page updates.. I will spin around and add the new handoff function to the man page on the next pass (with my comments).

sys/netinet/tcp_usrreq.c
1442 ↗(On Diff #17507)

I will add a comment so then it will be fine :-)

1465 ↗(On Diff #17507)

add comment will comply :-)

rrs edited edge metadata.

This addresses Jonathan's Nits.. However after reading the man page I can't see how one would
discuss the finer points of changing stacks (there is no mention of it that I can see in the current
man page). Jonathan perhaps you can, as we say in the IETF, send text :-)

In D6790#148608, @rrs wrote:

This addresses Jonathan's Nits.. However after reading the man page I can't see how one would
discuss the finer points of changing stacks (there is no mention of it that I can see in the current
man page). Jonathan perhaps you can, as we say in the IETF, send text :-)

I just sent this to you privately.

rrs edited edge metadata.

This gets Jtl's changes in.. I also move the init function down to the
end of the tcb init.. otherwise its possible a init() function may find
that some state init'd later is not what it expects (though it still
has to allow for this in the inp.. lets try to make it easier on the init's built)