Commit ad35d6cd authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

nvme_spec: add spdk_ prefixes



Use shorter names for commonly-used objects:
namespace -> ns
controller -> ctrlr
command -> cmd
completion -> cpl

Change-Id: I97d192546b35a6aeb76ad3a709f65631502cde71
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 7672976a
Loading
Loading
Loading
Loading
+28 −27
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ struct feature {

static struct feature features[256];

static struct nvme_health_information_page *health_page;
static struct spdk_nvme_health_information_page *health_page;

static struct spdk_nvme_intel_smart_information_page *intel_smart_page;

@@ -110,11 +110,12 @@ hex_dump(const void *data, size_t size)
}

static void
get_feature_completion(void *cb_arg, const struct nvme_completion *cpl)
get_feature_completion(void *cb_arg, const struct spdk_nvme_cpl *cpl)
{
	struct feature *feature = cb_arg;
	int fid = feature - features;
	if (nvme_completion_is_error(cpl)) {

	if (spdk_nvme_cpl_is_error(cpl)) {
		printf("get_feature(0x%02X) failed\n", fid);
	} else {
		feature->result = cpl->cdw0;
@@ -124,9 +125,9 @@ get_feature_completion(void *cb_arg, const struct nvme_completion *cpl)
}

static void
get_log_page_completion(void *cb_arg, const struct nvme_completion *cpl)
get_log_page_completion(void *cb_arg, const struct spdk_nvme_cpl *cpl)
{
	if (nvme_completion_is_error(cpl)) {
	if (spdk_nvme_cpl_is_error(cpl)) {
		printf("get log page failed\n");
	}
	outstanding_commands--;
@@ -135,9 +136,9 @@ get_log_page_completion(void *cb_arg, const struct nvme_completion *cpl)
static int
get_feature(struct nvme_controller *ctrlr, uint8_t fid)
{
	struct nvme_command cmd = {};
	struct spdk_nvme_cmd cmd = {};

	cmd.opc = NVME_OPC_GET_FEATURES;
	cmd.opc = SPDK_NVME_OPC_GET_FEATURES;
	cmd.cdw10 = fid;

	return nvme_ctrlr_cmd_admin_raw(ctrlr, &cmd, NULL, 0, get_feature_completion, &features[fid]);
@@ -149,10 +150,10 @@ get_features(struct nvme_controller *ctrlr)
	size_t i;

	uint8_t features_to_get[] = {
		NVME_FEAT_ARBITRATION,
		NVME_FEAT_POWER_MANAGEMENT,
		NVME_FEAT_TEMPERATURE_THRESHOLD,
		NVME_FEAT_ERROR_RECOVERY,
		SPDK_NVME_FEAT_ARBITRATION,
		SPDK_NVME_FEAT_POWER_MANAGEMENT,
		SPDK_NVME_FEAT_TEMPERATURE_THRESHOLD,
		SPDK_NVME_FEAT_ERROR_RECOVERY,
	};

	/* Submit several GET FEATURES commands and wait for them to complete */
@@ -181,7 +182,7 @@ get_health_log_page(struct nvme_controller *ctrlr)
		exit(1);
	}

	if (nvme_ctrlr_cmd_get_log_page(ctrlr, NVME_LOG_HEALTH_INFORMATION, NVME_GLOBAL_NAMESPACE_TAG,
	if (nvme_ctrlr_cmd_get_log_page(ctrlr, SPDK_NVME_LOG_HEALTH_INFORMATION, SPDK_NVME_GLOBAL_NS_TAG,
					health_page, sizeof(*health_page), get_log_page_completion, NULL)) {
		printf("nvme_ctrlr_cmd_get_log_page() failed\n");
		exit(1);
@@ -201,7 +202,7 @@ get_intel_smart_log_page(struct nvme_controller *ctrlr)
		exit(1);
	}

	if (nvme_ctrlr_cmd_get_log_page(ctrlr, SPDK_NVME_INTEL_LOG_SMART, NVME_GLOBAL_NAMESPACE_TAG,
	if (nvme_ctrlr_cmd_get_log_page(ctrlr, SPDK_NVME_INTEL_LOG_SMART, SPDK_NVME_GLOBAL_NS_TAG,
					intel_smart_page, sizeof(*intel_smart_page), get_log_page_completion, NULL)) {
		printf("nvme_ctrlr_cmd_get_log_page() failed\n");
		exit(1);
@@ -222,7 +223,7 @@ get_intel_temperature_log_page(struct nvme_controller *ctrlr)
		exit(1);
	}

	if (nvme_ctrlr_cmd_get_log_page(ctrlr, SPDK_NVME_INTEL_LOG_TEMPERATURE, NVME_GLOBAL_NAMESPACE_TAG,
	if (nvme_ctrlr_cmd_get_log_page(ctrlr, SPDK_NVME_INTEL_LOG_TEMPERATURE, SPDK_NVME_GLOBAL_NS_TAG,
					intel_temperature_page, sizeof(*intel_temperature_page), get_log_page_completion, NULL)) {
		printf("nvme_ctrlr_cmd_get_log_page() failed\n");
		exit(1);
@@ -233,7 +234,7 @@ get_intel_temperature_log_page(struct nvme_controller *ctrlr)
static void
get_log_pages(struct nvme_controller *ctrlr)
{
	const struct nvme_controller_data *ctrlr_data;
	const struct spdk_nvme_ctrlr_data *ctrlr_data;
	outstanding_commands = 0;

	if (get_health_log_page(ctrlr) == 0) {
@@ -322,7 +323,7 @@ print_uint_var_dec(uint8_t *array, unsigned int len)
static void
print_namespace(struct nvme_namespace *ns)
{
	const struct nvme_namespace_data	*nsdata;
	const struct spdk_nvme_ns_data		*nsdata;
	uint32_t				i;
	uint32_t				flags;

@@ -365,7 +366,7 @@ print_namespace(struct nvme_namespace *ns)
static void
print_controller(struct nvme_controller *ctrlr, struct spdk_pci_device *pci_dev)
{
	const struct nvme_controller_data	*cdata;
	const struct spdk_nvme_ctrlr_data	*cdata;
	uint8_t					str[128];
	uint32_t				i;

@@ -405,8 +406,8 @@ print_controller(struct nvme_controller *ctrlr, struct spdk_pci_device *pci_dev)
		printf("Unlimited\n");
	else
		printf("%d\n", 4096 * (1 << cdata->mdts));
	if (features[NVME_FEAT_ERROR_RECOVERY].valid) {
		unsigned tler = features[NVME_FEAT_ERROR_RECOVERY].result & 0xFFFF;
	if (features[SPDK_NVME_FEAT_ERROR_RECOVERY].valid) {
		unsigned tler = features[SPDK_NVME_FEAT_ERROR_RECOVERY].result & 0xFFFF;
		printf("Error Recovery Timeout:     ");
		if (tler == 0) {
			printf("Unlimited\n");
@@ -475,8 +476,8 @@ print_controller(struct nvme_controller *ctrlr, struct spdk_pci_device *pci_dev)
	       cdata->sgls.oversized_sgl_supported ? "Supported" : "Not Supported");
	printf("\n");

	if (features[NVME_FEAT_ARBITRATION].valid) {
		uint32_t arb = features[NVME_FEAT_ARBITRATION].result;
	if (features[SPDK_NVME_FEAT_ARBITRATION].valid) {
		uint32_t arb = features[SPDK_NVME_FEAT_ARBITRATION].result;
		unsigned ab, lpw, mpw, hpw;

		ab = arb & 0x3;
@@ -498,14 +499,14 @@ print_controller(struct nvme_controller *ctrlr, struct spdk_pci_device *pci_dev)
		printf("\n");
	}

	if (features[NVME_FEAT_POWER_MANAGEMENT].valid) {
		unsigned ps = features[NVME_FEAT_POWER_MANAGEMENT].result & 0x1F;
	if (features[SPDK_NVME_FEAT_POWER_MANAGEMENT].valid) {
		unsigned ps = features[SPDK_NVME_FEAT_POWER_MANAGEMENT].result & 0x1F;
		printf("Power Management\n");
		printf("================\n");
		printf("Number of Power States:      %u\n", cdata->npss + 1);
		printf("Current Power State:         Power State #%u\n", ps);
		for (i = 0; i <= cdata->npss; i++) {
			const struct nvme_power_state *psd = &cdata->psd[i];
			const struct spdk_nvme_power_state *psd = &cdata->psd[i];
			printf("Power State #%u:  ", i);
			if (psd->mps) {
				/* MP scale is 0.0001 W */
@@ -523,7 +524,7 @@ print_controller(struct nvme_controller *ctrlr, struct spdk_pci_device *pci_dev)
		printf("\n");
	}

	if (features[NVME_FEAT_TEMPERATURE_THRESHOLD].valid && health_page) {
	if (features[SPDK_NVME_FEAT_TEMPERATURE_THRESHOLD].valid && health_page) {
		printf("Health Information\n");
		printf("==================\n");

@@ -547,8 +548,8 @@ print_controller(struct nvme_controller *ctrlr, struct spdk_pci_device *pci_dev)
		       health_page->temperature,
		       health_page->temperature - 273);
		printf("Temperature Threshold:       %u Kelvin (%u Celsius)\n",
		       features[NVME_FEAT_TEMPERATURE_THRESHOLD].result,
		       features[NVME_FEAT_TEMPERATURE_THRESHOLD].result - 273);
		       features[SPDK_NVME_FEAT_TEMPERATURE_THRESHOLD].result,
		       features[SPDK_NVME_FEAT_TEMPERATURE_THRESHOLD].result - 273);
		printf("Available Spare:             %u%%\n", health_page->available_spare);
		printf("Life Percentage Used:        %u%%\n", health_page->percentage_used);
		printf("Data Units Read:             ");
+7 −7
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ static void
register_ns(struct nvme_controller *ctrlr, struct nvme_namespace *ns)
{
	struct ns_entry *entry;
	const struct nvme_controller_data *cdata;
	const struct spdk_nvme_ctrlr_data *cdata;

	cdata = nvme_ctrlr_get_data(ctrlr);

@@ -182,9 +182,9 @@ register_ns(struct nvme_controller *ctrlr, struct nvme_namespace *ns)
}

static void
enable_latency_tracking_complete(void *cb_arg, const struct nvme_completion *cpl)
enable_latency_tracking_complete(void *cb_arg, const struct spdk_nvme_cpl *cpl)
{
	if (nvme_completion_is_error(cpl)) {
	if (spdk_nvme_cpl_is_error(cpl)) {
		printf("enable_latency_tracking_complete failed\n");
	}
	g_outstanding_commands--;
@@ -220,7 +220,7 @@ register_ctrlr(struct nvme_controller *ctrlr)
{
	int nsid, num_ns;
	struct ctrlr_entry *entry = malloc(sizeof(struct ctrlr_entry));
	const struct nvme_controller_data *cdata = nvme_ctrlr_get_data(ctrlr);
	const struct spdk_nvme_ctrlr_data *cdata = nvme_ctrlr_get_data(ctrlr);

	if (entry == NULL) {
		perror("ctrlr_entry malloc");
@@ -361,7 +361,7 @@ static void task_ctor(struct rte_mempool *mp, void *arg, void *__task, unsigned
	}
}

static void io_complete(void *ctx, const struct nvme_completion *completion);
static void io_complete(void *ctx, const struct spdk_nvme_cpl *completion);

static __thread unsigned int seed = 0;

@@ -444,7 +444,7 @@ task_complete(struct perf_task *task)
}

static void
io_complete(void *ctx, const struct nvme_completion *completion)
io_complete(void *ctx, const struct spdk_nvme_cpl *completion)
{
	task_complete((struct perf_task *)ctx);
}
@@ -615,7 +615,7 @@ print_latency_statistics(const char *op_name, enum spdk_nvme_intel_log_page log_
	ctrlr = g_controllers;
	while (ctrlr) {
		if (nvme_ctrlr_is_log_page_supported(ctrlr->ctrlr, log_page)) {
			if (nvme_ctrlr_cmd_get_log_page(ctrlr->ctrlr, log_page, NVME_GLOBAL_NAMESPACE_TAG,
			if (nvme_ctrlr_cmd_get_log_page(ctrlr->ctrlr, log_page, SPDK_NVME_GLOBAL_NS_TAG,
							ctrlr->latency_page, sizeof(struct spdk_nvme_intel_rw_latency_page),
							enable_latency_tracking_complete,
							NULL)) {
+35 −33
Original line number Diff line number Diff line
@@ -74,11 +74,12 @@ static struct feature features[256];
#define CR_KEY		0xDEADBEAF5A5A5A5B

static void
get_feature_completion(void *cb_arg, const struct nvme_completion *cpl)
get_feature_completion(void *cb_arg, const struct spdk_nvme_cpl *cpl)
{
	struct feature *feature = cb_arg;
	int fid = feature - features;
	if (nvme_completion_is_error(cpl)) {

	if (spdk_nvme_cpl_is_error(cpl)) {
		fprintf(stdout, "get_feature(0x%02X) failed\n", fid);
	} else {
		feature->result = cpl->cdw0;
@@ -88,11 +89,12 @@ get_feature_completion(void *cb_arg, const struct nvme_completion *cpl)
}

static void
set_feature_completion(void *cb_arg, const struct nvme_completion *cpl)
set_feature_completion(void *cb_arg, const struct spdk_nvme_cpl *cpl)
{
	struct feature *feature = cb_arg;
	int fid = feature - features;
	if (nvme_completion_is_error(cpl)) {

	if (spdk_nvme_cpl_is_error(cpl)) {
		fprintf(stdout, "set_feature(0x%02X) failed\n", fid);
		set_feature_result = -1;
	} else {
@@ -106,16 +108,16 @@ get_host_identifier(struct nvme_controller *ctrlr)
{
	int ret;
	uint64_t *host_id;
	struct nvme_command cmd = {};
	struct spdk_nvme_cmd cmd = {};

	cmd.opc = NVME_OPC_GET_FEATURES;
	cmd.cdw10 = NVME_FEAT_HOST_IDENTIFIER;
	cmd.opc = SPDK_NVME_OPC_GET_FEATURES;
	cmd.cdw10 = SPDK_NVME_FEAT_HOST_IDENTIFIER;

	outstanding_commands = 0;

	host_id = rte_malloc(NULL, 8, 0);
	ret = nvme_ctrlr_cmd_admin_raw(ctrlr, &cmd, host_id, 8,
				       get_feature_completion, &features[NVME_FEAT_HOST_IDENTIFIER]);
				       get_feature_completion, &features[SPDK_NVME_FEAT_HOST_IDENTIFIER]);
	if (ret) {
		fprintf(stdout, "Get Feature: Failed\n");
		return -1;
@@ -127,7 +129,7 @@ get_host_identifier(struct nvme_controller *ctrlr)
		nvme_ctrlr_process_admin_completions(ctrlr);
	}

	if (features[NVME_FEAT_HOST_IDENTIFIER].valid) {
	if (features[SPDK_NVME_FEAT_HOST_IDENTIFIER].valid) {
		fprintf(stdout, "Get Feature: Host Identifier 0x%"PRIx64"\n", *host_id);
	}

@@ -139,10 +141,10 @@ set_host_identifier(struct nvme_controller *ctrlr)
{
	int ret;
	uint64_t *host_id;
	struct nvme_command cmd = {};
	struct spdk_nvme_cmd cmd = {};

	cmd.opc = NVME_OPC_SET_FEATURES;
	cmd.cdw10 = NVME_FEAT_HOST_IDENTIFIER;
	cmd.opc = SPDK_NVME_OPC_SET_FEATURES;
	cmd.cdw10 = SPDK_NVME_FEAT_HOST_IDENTIFIER;

	host_id = rte_malloc(NULL, 8, 0);
	*host_id = HOST_ID;
@@ -152,7 +154,7 @@ set_host_identifier(struct nvme_controller *ctrlr)

	fprintf(stdout, "Set Feature: Host Identifier 0x%"PRIx64"\n", *host_id);
	ret = nvme_ctrlr_cmd_admin_raw(ctrlr, &cmd, host_id, 8,
				       set_feature_completion, &features[NVME_FEAT_HOST_IDENTIFIER]);
				       set_feature_completion, &features[SPDK_NVME_FEAT_HOST_IDENTIFIER]);
	if (ret) {
		fprintf(stdout, "Set Feature: Failed\n");
		rte_free(host_id);
@@ -173,9 +175,9 @@ set_host_identifier(struct nvme_controller *ctrlr)
}

static void
reservation_ns_completion(void *cb_arg, const struct nvme_completion *cpl)
reservation_ns_completion(void *cb_arg, const struct spdk_nvme_cpl *cpl)
{
	if (nvme_completion_is_error(cpl)) {
	if (spdk_nvme_cpl_is_error(cpl)) {
		reserve_command_result = -1;
	} else {
		reserve_command_result = 0;
@@ -188,12 +190,12 @@ static int
reservation_ns_register(struct nvme_controller *ctrlr, uint16_t ns_id)
{
	int ret;
	struct nvme_reservation_register_data *rr_data;
	struct spdk_nvme_reservation_register_data *rr_data;
	struct nvme_namespace *ns;

	ns = nvme_ctrlr_get_ns(ctrlr, ns_id);

	rr_data = rte_zmalloc(NULL, sizeof(struct nvme_reservation_register_data), 0);
	rr_data = rte_zmalloc(NULL, sizeof(struct spdk_nvme_reservation_register_data), 0);
	rr_data->crkey = CR_KEY;
	rr_data->nrkey = CR_KEY;

@@ -201,8 +203,8 @@ reservation_ns_register(struct nvme_controller *ctrlr, uint16_t ns_id)
	reserve_command_result = -1;

	ret = nvme_ns_cmd_reservation_register(ns, rr_data, 1,
					       NVME_RESERVE_REGISTER_KEY,
					       NVME_RESERVE_PTPL_NO_CHANGES,
					       SPDK_NVME_RESERVE_REGISTER_KEY,
					       SPDK_NVME_RESERVE_PTPL_NO_CHANGES,
					       reservation_ns_completion, NULL);
	if (ret) {
		fprintf(stderr, "Reservation Register Failed\n");
@@ -227,8 +229,8 @@ reservation_ns_report(struct nvme_controller *ctrlr, uint16_t ns_id)
{
	int ret, i;
	uint8_t *payload;
	struct nvme_reservation_status_data *status;
	struct nvme_reservation_controller_data *cdata;
	struct spdk_nvme_reservation_status_data *status;
	struct spdk_nvme_reservation_ctrlr_data *cdata;
	struct nvme_namespace *ns;

	ns = nvme_ctrlr_get_ns(ctrlr, ns_id);
@@ -256,14 +258,14 @@ reservation_ns_report(struct nvme_controller *ctrlr, uint16_t ns_id)
		return 0;
	}

	status = (struct nvme_reservation_status_data *)payload;
	status = (struct spdk_nvme_reservation_status_data *)payload;
	fprintf(stdout, "Reservation Generation Counter                  %u\n", status->generation);
	fprintf(stdout, "Reservation type                                %u\n", status->type);
	fprintf(stdout, "Reservation Number of Registered Controllers    %u\n", status->nr_regctl);
	fprintf(stdout, "Reservation Persist Through Power Loss State    %u\n", status->ptpl_state);
	for (i = 0; i < status->nr_regctl; i++) {
		cdata = (struct nvme_reservation_controller_data *)(payload + sizeof(struct
				nvme_reservation_status_data) * (i + 1));
		cdata = (struct spdk_nvme_reservation_ctrlr_data *)(payload + sizeof(struct
				spdk_nvme_reservation_status_data) * (i + 1));
		fprintf(stdout, "Controller ID                           %u\n", cdata->ctrlr_id);
		fprintf(stdout, "Controller Reservation Status           %u\n", cdata->rcsts.status);
		fprintf(stdout, "Controller Host ID                      0x%"PRIx64"\n", cdata->host_id);
@@ -278,11 +280,11 @@ static int
reservation_ns_acquire(struct nvme_controller *ctrlr, uint16_t ns_id)
{
	int ret;
	struct nvme_reservation_acquire_data *cdata;
	struct spdk_nvme_reservation_acquire_data *cdata;
	struct nvme_namespace *ns;

	ns = nvme_ctrlr_get_ns(ctrlr, ns_id);
	cdata = rte_zmalloc(NULL, sizeof(struct nvme_reservation_acquire_data), 0);
	cdata = rte_zmalloc(NULL, sizeof(struct spdk_nvme_reservation_acquire_data), 0);
	cdata->crkey = CR_KEY;

	outstanding_commands = 0;
@@ -290,8 +292,8 @@ reservation_ns_acquire(struct nvme_controller *ctrlr, uint16_t ns_id)

	ret = nvme_ns_cmd_reservation_acquire(ns, cdata,
					      0,
					      NVME_RESERVE_ACQUIRE,
					      NVME_RESERVE_WRITE_EXCLUSIVE,
					      SPDK_NVME_RESERVE_ACQUIRE,
					      SPDK_NVME_RESERVE_WRITE_EXCLUSIVE,
					      reservation_ns_completion, NULL);
	if (ret) {
		fprintf(stderr, "Reservation Acquire Failed\n");
@@ -315,11 +317,11 @@ static int
reservation_ns_release(struct nvme_controller *ctrlr, uint16_t ns_id)
{
	int ret;
	struct nvme_reservation_key_data *cdata;
	struct spdk_nvme_reservation_key_data *cdata;
	struct nvme_namespace *ns;

	ns = nvme_ctrlr_get_ns(ctrlr, ns_id);
	cdata = rte_zmalloc(NULL, sizeof(struct nvme_reservation_key_data), 0);
	cdata = rte_zmalloc(NULL, sizeof(struct spdk_nvme_reservation_key_data), 0);
	cdata->crkey = CR_KEY;

	outstanding_commands = 0;
@@ -327,8 +329,8 @@ reservation_ns_release(struct nvme_controller *ctrlr, uint16_t ns_id)

	ret = nvme_ns_cmd_reservation_release(ns, cdata,
					      0,
					      NVME_RESERVE_RELEASE,
					      NVME_RESERVE_WRITE_EXCLUSIVE,
					      SPDK_NVME_RESERVE_RELEASE,
					      SPDK_NVME_RESERVE_WRITE_EXCLUSIVE,
					      reservation_ns_completion, NULL);
	if (ret) {
		fprintf(stderr, "Reservation Release Failed\n");
@@ -351,7 +353,7 @@ reservation_ns_release(struct nvme_controller *ctrlr, uint16_t ns_id)
static void
reserve_controller(struct nvme_controller *ctrlr, struct spdk_pci_device *pci_dev)
{
	const struct nvme_controller_data	*cdata;
	const struct spdk_nvme_ctrlr_data	*cdata;

	cdata = nvme_ctrlr_get_data(ctrlr);

+15 −15
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ int nvme_ctrlr_reset(struct nvme_controller *ctrlr);
 *  the SPDK NVMe driver.
 *
 */
const struct nvme_controller_data *nvme_ctrlr_get_data(struct nvme_controller *ctrlr);
const struct spdk_nvme_ctrlr_data *nvme_ctrlr_get_data(struct nvme_controller *ctrlr);

/**
 * \brief Get the number of namespaces for the given NVMe controller.
@@ -150,7 +150,7 @@ bool nvme_ctrlr_is_feature_supported(struct nvme_controller *ctrlr, uint8_t feat
 *
 * The nvme_completion parameter contains the completion status.
 */
typedef void (*nvme_cb_fn_t)(void *, const struct nvme_completion *);
typedef void (*nvme_cb_fn_t)(void *, const struct spdk_nvme_cpl *);

/**
 * Signature for callback function invoked when an asynchronous error
@@ -162,7 +162,7 @@ typedef void (*nvme_cb_fn_t)(void *, const struct nvme_completion *);
 *  asynchronous event request that was completed.
 */
typedef void (*nvme_aer_cb_fn_t)(void *aer_cb_arg,
				 const struct nvme_completion *);
				 const struct spdk_nvme_cpl *);

void nvme_ctrlr_register_aer_callback(struct nvme_controller *ctrlr,
				      nvme_aer_cb_fn_t aer_cb_fn,
@@ -183,7 +183,7 @@ void nvme_ctrlr_register_aer_callback(struct nvme_controller *ctrlr,
 *
 */
int nvme_ctrlr_cmd_io_raw(struct nvme_controller *ctrlr,
			  struct nvme_command *cmd,
			  struct spdk_nvme_cmd *cmd,
			  void *buf, uint32_t len,
			  nvme_cb_fn_t cb_fn, void *cb_arg);

@@ -223,7 +223,7 @@ int32_t nvme_ctrlr_process_io_completions(struct nvme_controller *ctrlr, uint32_
 * of commands submitted through this function.
 */
int nvme_ctrlr_cmd_admin_raw(struct nvme_controller *ctrlr,
			     struct nvme_command *cmd,
			     struct spdk_nvme_cmd *cmd,
			     void *buf, uint32_t len,
			     nvme_cb_fn_t cb_fn, void *cb_arg);

@@ -341,7 +341,7 @@ int nvme_ctrlr_cmd_get_feature(struct nvme_controller *ctrlr,
 * This function is thread safe and can be called at any point while the controller is attached to
 *  the SPDK NVMe driver.
 */
const struct nvme_namespace_data *nvme_ns_get_data(struct nvme_namespace *ns);
const struct spdk_nvme_ns_data *nvme_ns_get_data(struct nvme_namespace *ns);

/**
 * \brief Get the namespace id (index number) from the given namespace handle.
@@ -588,10 +588,10 @@ int nvme_ns_cmd_flush(struct nvme_namespace *ns, nvme_cb_fn_t cb_fn,
 * nvme_register_io_thread().
 */
int nvme_ns_cmd_reservation_register(struct nvme_namespace *ns,
				     struct nvme_reservation_register_data *payload,
				     struct spdk_nvme_reservation_register_data *payload,
				     bool ignore_key,
				     enum nvme_reservation_register_action action,
				     enum nvme_reservation_register_cptpl cptpl,
				     enum spdk_nvme_reservation_register_action action,
				     enum spdk_nvme_reservation_register_cptpl cptpl,
				     nvme_cb_fn_t cb_fn, void *cb_arg);

/**
@@ -612,10 +612,10 @@ int nvme_ns_cmd_reservation_register(struct nvme_namespace *ns,
 * nvme_register_io_thread().
 */
int nvme_ns_cmd_reservation_release(struct nvme_namespace *ns,
				    struct nvme_reservation_key_data *payload,
				    struct spdk_nvme_reservation_key_data *payload,
				    bool ignore_key,
				    enum nvme_reservation_release_action action,
				    enum nvme_reservation_type type,
				    enum spdk_nvme_reservation_release_action action,
				    enum spdk_nvme_reservation_type type,
				    nvme_cb_fn_t cb_fn, void *cb_arg);

/**
@@ -636,10 +636,10 @@ int nvme_ns_cmd_reservation_release(struct nvme_namespace *ns,
 * nvme_register_io_thread().
 */
int nvme_ns_cmd_reservation_acquire(struct nvme_namespace *ns,
				    struct nvme_reservation_acquire_data *payload,
				    struct spdk_nvme_reservation_acquire_data *payload,
				    bool ignore_key,
				    enum nvme_reservation_acquire_action action,
				    enum nvme_reservation_type type,
				    enum spdk_nvme_reservation_acquire_action action,
				    enum spdk_nvme_reservation_type type,
				    nvme_cb_fn_t cb_fn, void *cb_arg);

/**
+257 −236

File changed.

Preview size limit exceeded, changes collapsed.

Loading