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

nvme: add weighted round robin supported flags

parent 2f9d2b81
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -31,6 +31,9 @@ it for NVMe controllers. When the option is enabled, the controller will not do
shutdown process and just disable the controller, users can start their application
later again to initialize the controller to the ready state.

A controller flag `SPDK_NVME_CTRLR_WRR_SUPPORTED` was added to indicate the controller
can support weighted round robin arbitration feature with submission queue.

### iSCSI

Portals may no longer be associated with a cpumask. The scheduling of
+1 −0
Original line number Diff line number Diff line
@@ -322,6 +322,7 @@ struct spdk_nvme_host_id {
enum spdk_nvme_ctrlr_flags {
	SPDK_NVME_CTRLR_SGL_SUPPORTED			= 0x1, /**< The SGL is supported */
	SPDK_NVME_CTRLR_SECURITY_SEND_RECV_SUPPORTED	= 0x2, /**< security send/receive is supported */
	SPDK_NVME_CTRLR_WRR_SUPPORTED			= 0x4, /**< Weighted Round Robin is supported */
};

/**
+4 −0
Original line number Diff line number Diff line
@@ -2361,6 +2361,10 @@ nvme_ctrlr_init_cap(struct spdk_nvme_ctrlr *ctrlr, const union spdk_nvme_cap_reg
	ctrlr->cap = *cap;
	ctrlr->vs = *vs;

	if (ctrlr->cap.bits.ams & SPDK_NVME_CAP_AMS_WRR) {
		ctrlr->flags |= SPDK_NVME_CTRLR_WRR_SUPPORTED;
	}

	ctrlr->min_page_size = 1u << (12 + ctrlr->cap.bits.mpsmin);

	/* For now, always select page_size == min_page_size. */