Page MenuHomeFreeBSD

nvmft: Handle transport errors on unaccepted qpairs
Needs ReviewPublic

Authored by jhb on Thu, Oct 8, 3:53 PM.
Tags
None
Referenced Files
F175293356: D60477.id189068.diff
Fri, Oct 9, 5:51 PM
F175286936: D60477.id.diff
Fri, Oct 9, 4:53 PM
F175279090: D60477.diff
Fri, Oct 9, 4:07 PM
F175216458: D60477.diff
Fri, Oct 9, 4:29 AM
F175194932: D60477.id189068.diff
Fri, Oct 9, 12:34 AM
F175192590: D60477.diff
Fri, Oct 9, 12:11 AM
F175181200: D60477.diff
Thu, Oct 8, 10:19 PM
F175180750: D60477.diff
Thu, Oct 8, 10:14 PM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

If a new qpair has not been accepted when a transport error occurs
(including EOF from the socket being closed), the ctrlr field will not
yet be set, so don't try to report a controller-wide error. Instead,
note that the error occurred in the internal qpair state and return.

If a CONNECT request is rejected, the qpair will never be associated
with a controller and will be destroyed. Once the underlying socket
is closed, the error handler is invoked which previously would panic
since there was no controller set. Now the error handler just returns
allowing the TX thread to exit and complete the qpair destruction.

While here, handle some other races such as the socket being closed
while a valid CONNECT request is being validated by ensuring the
controller field is set at the same time the controller's internal
state adds a pointer to the qpair allowing any subsequent error to
trigger a controller error including if the connection drops before
the CONNECT reply is sent. Also, ensure that terminating a controller
waits for any threads sending a CONNECT reply to release their
implicit reference on the controller and queue pair before tearing
down controller state.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77861
Build 74744: arc lint + arc unit