On Mon, 2019-01-28 at 17:42 +0000, Gill, John wrote:
We are trying to implement NSSR using SPDK. In NVME CLI using the
default
linux NVMe driver, we can get the reset to occur, and the kernel driver
seemingly re-probes the system automatically. We would like to achieve
similar behavior when using the DPDK driver without toggling drivers or
performing a host reboot.
I am not sure if anyone has had similar needs. If so, I would appreciate any
suggestions on accomplishing this.
Today the NVMe driver exposes one reset related function:
int spdk_nvme_ctrlr_reset(struct spdk_nvme_ctrlr *ctrlr);
This performs a controller level reset (CC.EN to 0, then to 1) of the device. I
think the best way to add support for NSSR is to add a new function, declared in
include/spdk/nvme.h, for a subsystem reset:
int spdk_nvme_subsystem_reset(struct spdk_nvme_ctrlr *ctrlr);
The parameter still will need to be an NVMe controller because we don't
currently model an NVMe subsystem object in the NVMe driver (we do in NVMe-oF).
The implementation of this new function should look mostly like
spdk_nvme_ctrlr_reset, but of course instead of just writing CC.EN to 0 and back
to 1, it should first write "NVMe" to the NSSRC register (or fail if the
device
does not support subsystem reset) and then CC.EN back to 1.
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk