Commit 45b6720b authored by sunshihao520's avatar sunshihao520 Committed by Tomasz Zawadzki
Browse files

nvme : Add OPTPERF definition to nvme_spec.h



When ns set OPTPERF to 1, use NPWG and NPWA to set sectors_per_stripe.

Signed-off-by: default avatarsunshihao <sunshihao@huawei.com>
Change-Id: Iaf72ba5a7f21b33c357fba8deced9616e0bfaca6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6613


Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 5bdaec63
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@ Added `spdk_nvme_qpair_get_optimal_poll_group` function and `qpair_get_optimal_p
function pointer in spdk_nvmf_transport_ops structure in order to add the qpair to the most
suitable polling group.

Add OPTPERF and namespace optimal performance fields to nvme_spec.h.

Added spdk_nvme_set_hotplug_filter API to allow applications to choose which
hot-inserted SSDs should be probed. This is useful for use cases where multiple
independent SPDK processes are running on one node.  The filter function can
+20 −2
Original line number Diff line number Diff line
@@ -2295,7 +2295,10 @@ struct spdk_nvme_ns_data {
		/** Non-zero NGUID and EUI64 for namespace are never reused */
		uint8_t		guid_never_reused : 1;

		uint8_t		reserved1 : 4;
		/** Optimal Performance field */
		uint8_t		optperf : 1;

		uint8_t		reserved1 : 3;
	} nsfeat;

	/** number of lba formats */
@@ -2444,7 +2447,22 @@ struct spdk_nvme_ns_data {
	/** NVM capacity */
	uint64_t		nvmcap[2];

	uint8_t			reserved64[28];
	/** Namespace Preferred Write Granularity */
	uint16_t		npwg;

	/** Namespace Preferred Write Alignment */
	uint16_t                npwa;

	/** Namespace Preferred Deallocate Granularity */
	uint16_t                npdg;

	/** Namespace Preferred Deallocate Alignment */
	uint16_t                npda;

	/** Namespace Optimal Write Size */
	uint16_t                nows;

	uint8_t			reserved64[18];

	/** ANA group identifier */
	uint32_t		anagrpid;