Commit 77910859 authored by Changpeng Liu's avatar Changpeng Liu Committed by Jim Harris
Browse files

nvmf/vfio-user: add comments for endpoint and controller



Change-Id: Idde0f9c9cea6c26b7e65c8699b2e5f120d759d7f
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11825


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarThanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarDong Yi <dongx.yi@intel.com>
parent 673859cd
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -396,6 +396,9 @@ struct nvmf_vfio_user_ctrlr {
	bool					self_kick_requested;
};

/* Endpoint in vfio-user is associated with a socket file, which
 * is the representative of a PCI endpoint.
 */
struct nvmf_vfio_user_endpoint {
	struct nvmf_vfio_user_transport		*transport;
	vfu_ctx_t				*vfu_ctx;
@@ -416,6 +419,12 @@ struct nvmf_vfio_user_endpoint {
	struct spdk_nvme_transport_id		trid;
	const struct spdk_nvmf_subsystem	*subsystem;

	/* Controller is associated with an active socket connection,
	 * the lifecycle of the controller is same as the VM.
	 * Currently we only support one active connection, as the NVMe
	 * specification defines, we may support multiple controllers in
	 * future, so that it can support e.g: RESERVATION.
	 */
	struct nvmf_vfio_user_ctrlr		*ctrlr;
	pthread_mutex_t				lock;