#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
2ad9a815 |
| 08-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
nvme: Directly lookup op code
Rather than have a table to walk through, use a sparse array.
Suggested by: jhb Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D41353
|
#
95cd10f1 |
| 08-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
nvme: Add comments about other fields in status
When manually completing an I/O, we do so because we have no status back from the card. Note M, CRD and P are all 0 because this is an artificial even
nvme: Add comments about other fields in status
When manually completing an I/O, we do so because we have no status back from the card. Note M, CRD and P are all 0 because this is an artificial event (and phase isn't checked when it's completed this way). There's no MORE information in the error log page and there's no delayed retry (CRD=0) and we don't currently request CRD to be set to anything other than 0 and thus don't implement delayed retry.
Sponsored by: Netflix Reviewed by: chuck, mav, jhb Differential Revision: https://reviews.freebsd.org/D41314
show more ...
|
#
a510dbc8 |
| 08-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
nvme: Be less verbose when cancelling I/O or admin commands
When we're resetting, and there's outstanding I/O that we're cancelling, only report we're cancelling the I/O once rather than once per I/
nvme: Be less verbose when cancelling I/O or admin commands
When we're resetting, and there's outstanding I/O that we're cancelling, only report we're cancelling the I/O once rather than once per I/O. Likewise when we reschedule the I/O. We don't need to say for each one that we're cancelling/rescheduling something, and then report the I/O that we're doing. Likewise with cancelling admin commands (we never retry them here, so a similar change isn't needed).
Sponsored by: Netflix Reviewed by: chuck, mav Differential Revision: https://reviews.freebsd.org/D41313
show more ...
|
#
ac8c866f |
| 08-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
nvme: Add more NVME Base Spec 2.0 and NVME Command Set Spec 1.0a
Add admin commands capacity management, lockdown and fabrics commands. Add I/O copy command.
Sponsored by: Netflix Reviewed by: ch
nvme: Add more NVME Base Spec 2.0 and NVME Command Set Spec 1.0a
Add admin commands capacity management, lockdown and fabrics commands. Add I/O copy command.
Sponsored by: Netflix Reviewed by: chuck, mav, jhb Differential Revision: https://reviews.freebsd.org/D41311
show more ...
|
#
edd23e4d |
| 08-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
nvme: Eliminate redundant code
get_admin_opcode_string and get_io_opcode_string are identical, but start with different tables. Use a helper routine that takes an argument to implement these instead
nvme: Eliminate redundant code
get_admin_opcode_string and get_io_opcode_string are identical, but start with different tables. Use a helper routine that takes an argument to implement these instead. A future commit will refine this further.
Sponsored by: Netflix Reviewed by: chuck, mav, jhb Differential Revision: https://reviews.freebsd.org/D41310
show more ...
|
#
7be0b068 |
| 08-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
nvme: Remove duplicate command printing routine
Both nvme_dump_command and nvme_qpair_print_command print nvme commands. The former latter better. Recode the one call to nvme_dump_command to use nvm
nvme: Remove duplicate command printing routine
Both nvme_dump_command and nvme_qpair_print_command print nvme commands. The former latter better. Recode the one call to nvme_dump_command to use nvme_qpair_print_command and delete the former. No sense having two nearly identical routines. A future commit will convert to sbuf.
Sponsored by: Netflix Reviewed by: chuck, mav, jhb Differential Revision: https://reviews.freebsd.org/D41309
show more ...
|
#
6f76d493 |
| 08-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
nvme: Remove duplicate completion printing routine
Both nvme_dump_completion and nvme_qpair_print_completion print completions. The latter is better. Recode the two instances of nvme_dump_completion
nvme: Remove duplicate completion printing routine
Both nvme_dump_completion and nvme_qpair_print_completion print completions. The latter is better. Recode the two instances of nvme_dump_completion to use nvme_qpair_print_completion and delete the former. No sense having two nearly identical routines. A future commit will convert this to sbuf.
Sponsored by: Netflix Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D41308
show more ...
|
#
92103adb |
| 24-Jul-2023 |
John Baldwin <jhb@FreeBSD.org> |
nvme: Use a memdesc for the request buffer instead of a bespoke union.
This avoids encoding CAM-specific knowledge in nvme_qpair.c.
Reviewed by: chuck, imp, markj Sponsored by: Chelsio Communicatio
nvme: Use a memdesc for the request buffer instead of a bespoke union.
This avoids encoding CAM-specific knowledge in nvme_qpair.c.
Reviewed by: chuck, imp, markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41119
show more ...
|
#
5ae44634 |
| 27-Jun-2023 |
John Baldwin <jhb@FreeBSD.org> |
nvme: Fix typo in "Command Aborted by Host" constant name.
Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D40763
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0 |
|
#
49ebbdb2 |
| 08-Mar-2023 |
Alexander Motin <mav@FreeBSD.org> |
Add NAMESPACE MANAGEMENT into admin_opcode[].
MFC after: 1 week
|
Revision tags: release/12.4.0 |
|
#
4982884b |
| 11-Oct-2022 |
Warner Losh <imp@FreeBSD.org> |
nvme: Always set deadline to max
When a transaction is on the outstanding list, it needs to have a valid timeout value, so set it to infinity before placing it on the list. Place before we put it on
nvme: Always set deadline to max
When a transaction is on the outstanding list, it needs to have a valid timeout value, so set it to infinity before placing it on the list. Place before we put it on the list, even though the list is protected by the qpair lock.
Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D36920
show more ...
|
#
a69c0964 |
| 05-Aug-2022 |
Alexander Motin <mav@FreeBSD.org> |
nvme: Print CRD, M and DNR status bits on errors.
It may help with some issues debugging.
MFC after: 1 week
|
Revision tags: release/13.1.0 |
|
#
0fd4cd40 |
| 15-Apr-2022 |
Warner Losh <imp@FreeBSD.org> |
nvme: Use controller's page size instead of PAGE_SIZE to create qpair
When constructing qpair, use the controller's notion of page size rather than the host's PAGE_SIZE. Currently, these are both 4k
nvme: Use controller's page size instead of PAGE_SIZE to create qpair
When constructing qpair, use the controller's notion of page size rather than the host's PAGE_SIZE. Currently, these are both 4k, but the arm 16k page size support requires decoupling.
There's a "hidden" PAGE_SIZE in btoc, so we must change btoc(x) to howmany(x, ctrlr->page_size) to properly count the number of pages (in the drive's world view) are needed for various calculations.
With these changes, we the nvme driver operates at production level load for both host 4k and host 16k page size.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D34873
show more ...
|
#
dfa01f4f |
| 08-Apr-2022 |
Gordon Bergling <gbe@FreeBSD.org> |
nvme(4): Fix a typo in a source code comment
- s/is is/is/
MFC after: 3 days
|
#
b3c9b606 |
| 07-Jan-2022 |
Alexander Motin <mav@FreeBSD.org> |
nvme: Do not rearm timeout for commands without one.
Admin queues almost always have several ASYNC_EVENT_REQUEST outstanding. They have no timeouts, but their presence in qpair->outstanding_tr cause
nvme: Do not rearm timeout for commands without one.
Admin queues almost always have several ASYNC_EVENT_REQUEST outstanding. They have no timeouts, but their presence in qpair->outstanding_tr caused useless timeout callout rearming twice a second.
While there, relax timeout callout period from 0.5s to 0.5-1s to improve aggregation. Command timeouts are measured in seconds, so we don't need to be precise here.
Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33781
show more ...
|
Revision tags: release/12.3.0 |
|
#
2ec165e3 |
| 14-Oct-2021 |
Warner Losh <imp@FreeBSD.org> |
nvme: Reduce traffic to the doorbell register
Reduce traffic to doorbell register when processing multiple completion events at once. Only write it at the end of the loop after we've processed every
nvme: Reduce traffic to the doorbell register
Reduce traffic to doorbell register when processing multiple completion events at once. Only write it at the end of the loop after we've processed everything (assuming we found at least one completion, even if that completion wasn't valid).
Sponsored by: Netflix Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D32470
show more ...
|
#
18dc12bf |
| 12-Oct-2021 |
Warner Losh <imp@FreeBSD.org> |
nvme: Restore hotplug warning
Restore hotplug warning in recovery state machine. No functional change other than what message gets printed.
Sponsored by: Netflix
|
#
36a87d0c |
| 29-Sep-2021 |
Warner Losh <imp@FreeBSD.org> |
nvme: Sanity check completion id
Make sure the completion ID is in the range of [0..num_trackers) since the values past the end of the act_tr array are never going to be valid trackers and will lead
nvme: Sanity check completion id
Make sure the completion ID is in the range of [0..num_trackers) since the values past the end of the act_tr array are never going to be valid trackers and will lead to pain and suffering if we try to dereference them to get the tracker or to set the tracker back to NULL as we complete the I/O.
Sponsored by: Netflix Reviewed by: mav, chs, chuck Differential Revision: https://reviews.freebsd.org/D32088
show more ...
|
#
587aa255 |
| 29-Sep-2021 |
Warner Losh <imp@FreeBSD.org> |
nvme: count number of ignored interrupts
Count the number of times we're asked to process completions, but that we ignore because the state of the qpair isn't in RECOVERY_NONE.
Sponsored by: Netfl
nvme: count number of ignored interrupts
Count the number of times we're asked to process completions, but that we ignore because the state of the qpair isn't in RECOVERY_NONE.
Sponsored by: Netflix Reviewed by: mav, chuck Differential Revision: https://reviews.freebsd.org/D32212
show more ...
|
#
7d5eebe0 |
| 29-Sep-2021 |
Warner Losh <imp@FreeBSD.org> |
nvme: Add sanity check for phase on startup.
The proper phase for the qpiar right after reset in the first interrupt is 1. For it, make sure that we're not still in phase 0. This is an illegal state
nvme: Add sanity check for phase on startup.
The proper phase for the qpiar right after reset in the first interrupt is 1. For it, make sure that we're not still in phase 0. This is an illegal state to be processing interrupts and indicates that we've failed to properly protect against a race between initializing our state and processing interrupts. Modify stat resetting code so it resets the number of interrpts to 1 instead of 0 so we don't trigger a false positive panic.
Sponsored by: Netflix Reviewed by: cperciva, mav (prior version) Differential Revision: https://reviews.freebsd.org/D32211
show more ...
|
#
fa81f373 |
| 29-Sep-2021 |
Warner Losh <imp@FreeBSD.org> |
nvme: start qpair in state RECOVERY_WAITING
An interrupt happens on the admin queue right away after the reset, so as soon as we enable interrupts, we'll get a call to our interrupt handler. It is s
nvme: start qpair in state RECOVERY_WAITING
An interrupt happens on the admin queue right away after the reset, so as soon as we enable interrupts, we'll get a call to our interrupt handler. It is safe to ignore this interrupt if we're not yet initialized, or to process it if we are. If we are initialized, we'll see there's no completion records and return. If we're not, we'll process no completion records and return. Either way, nothing is processed and nothing is lost.
Until we've completely setup the qpair, we need to avoid processing completion records. Start the qpair in the waiting recovery state so we return immediately when we try to process completions. The code already sets it to 'NONE' when we're initialization is complete. It's safe to defer completion processing here because we don't send any commands before the initialization of the software state of the qpair is complete. And even if we were to somehow send a command prior to that completing, the completion record for that command would be processed when we send commands to the admin qpair after we've setup the software state. There's no good central point to add an assert for this last condition.
This fixes an KASSERT "received completion for unknown cmd" panic on boot.
Fixes: 502dc84a8b6703e7c0626739179a3cdffdd22d81 Sponsored by: Netflix Reviewed by: mav, cperciva, gallatin Differential Revision: https://reviews.freebsd.org/D32210
show more ...
|
#
502dc84a |
| 24-Sep-2021 |
Warner Losh <imp@FreeBSD.org> |
nvme: Use shared timeout rather than timeout per transaction
Keep track of the approximate time commands are 'due' and the next deadline for a command. twice a second, wake up to see if any commands
nvme: Use shared timeout rather than timeout per transaction
Keep track of the approximate time commands are 'due' and the next deadline for a command. twice a second, wake up to see if any commands have entered timeout. If so, quiessce and then enter a recovery mode half the timeout further in the future to allow the ISR to complete. Once we exit recovery mode, we go back to operations as normal.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28583
show more ...
|
#
4b977e6d |
| 17-Sep-2021 |
Warner Losh <imp@FreeBSD.org> |
nvme/nda: Fail all nvme I/Os after controller fails
Once the controller has failed, fail all I/O w/o sending it to the device. The reset of the nvme driver won't schedule any I/O to the failed devic
nvme/nda: Fail all nvme I/Os after controller fails
Once the controller has failed, fail all I/O w/o sending it to the device. The reset of the nvme driver won't schedule any I/O to the failed device, and the controller is in an indeterminate state and can't accept I/O. Fail both at the top end of the sim and the bottom end. Don't bother queueing up the I/O for failure in a different task.
Reviewed by: chuck Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31341
show more ...
|