Page MenuHomeFreeBSD

inpcb: retire INP_DROPPED and in_pcbdrop()
ClosedPublic

Authored by glebius on Tue, Mar 31, 3:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 18, 1:39 PM
Unknown Object (File)
Sat, Apr 18, 11:30 AM
Unknown Object (File)
Sat, Apr 18, 3:45 AM
Unknown Object (File)
Mon, Apr 13, 10:44 PM
Unknown Object (File)
Sat, Apr 11, 8:06 PM
Unknown Object (File)
Tue, Apr 7, 9:07 AM
Unknown Object (File)
Tue, Apr 7, 3:35 AM
Unknown Object (File)
Tue, Apr 7, 3:35 AM

Details

Summary

The inpcb flag INP_DROPPED served two purposes.

It was used by TCP and subsystems running on top of TCP as a flag that
marks a connection that is now in TCPS_CLOSED, but was in some other state
before (not a new-born connection). Create a new TCP flag TF_DISCONNECTED
for this purpose.

The in_pcbdrop() was a TCP's version of in_pcbdisconnect() that also sets
INP_DROPPED. Use in_pcbdisconnect() instead.

Second purpose of INP_DROPPED was a negative lookup mask in
inp_smr_lock(), as SMR-protected lookup may see inpcbs that had been
removed from the hash. We already have had INP_INHASHLIST that marks
inpcb that is in hash. Convert it into INP_UNCONNECTED with the opposite
meaning. This allows to combine it with INP_FREED for the negative lookup
mask.

The Chelsio/ToE and kTLS changes are done with some style refactoring,
like moving inp/tp assignments up and using macros for that. However, no
deep thinking was taken to check if those checks are really needed, it
could be that some are not.

Diff Detail

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

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Sat, Apr 18, 6:50 AM
This revision was automatically updated to reflect the committed changes.