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*
Details
- Reviewers
gallatin hiren jtl - Group Reviewers
transport - Commits
- rS304223: Here we update the modular tcp to be able to switch to an
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
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. |
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).
Now that the alternate stacks feature is documented (rS302247), please add documentation updates to this change.
Thanks!
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 :-)
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)