Commit 5d92820c authored by John Levon's avatar John Levon Committed by Tomasz Zawadzki
Browse files

nvmf: remove req->data field



Now all code has been adapted to use req->iov, and the deprecation
period has elapsed, remove the legacy ->data field altogether, along
with spdk_nvmf_request_get_data().

Signed-off-by: default avatarJohn Levon <john.levon@nutanix.com>
Change-Id: I22db8a7d8e086d9bcba3e784bf9dd19da147470f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16201


Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@gmail.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
parent 50f307e5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -16,6 +16,12 @@ For retrieving physical addresses, spdk_vtophys() should be used instead.

New APIs, `spdk_flog` and `spdk_vflog`, were added to write messages to the specified log file.

### nvmf

The `spdk_nvmf_request::data` field has been removed: instead, clients should set
`->iov` and `->iovcnt` appropriately, as nvmf request APIs now expect any data
buffers to be described there. spdk_nvmf_request_get_data() has been removed.

## v23.05

### accel
+0 −10
Original line number Diff line number Diff line
@@ -194,16 +194,6 @@ struct spdk_nvmf_ctrlr *spdk_nvmf_request_get_ctrlr(struct spdk_nvmf_request *re
 */
struct spdk_nvmf_subsystem *spdk_nvmf_request_get_subsystem(struct spdk_nvmf_request *req);

/**
 * Get the data and length associated with this request.
 *
 *
 * \param req The NVMe-oF request
 * \param data The data buffer associated with this request
 * \param length The length of the data buffer
 */
void spdk_nvmf_request_get_data(struct spdk_nvmf_request *req, void **data, uint32_t *length);

/**
 * Copy the data from the given @buf into the request iovec.
 *
+0 −1
Original line number Diff line number Diff line
@@ -78,7 +78,6 @@ struct spdk_nvmf_request {
	uint8_t				xfer; /* type enum spdk_nvme_data_transfer */
	bool				data_from_pool;
	bool				dif_enabled;
	void				*data;
	union nvmf_h2c_msg		*cmd;
	union nvmf_c2h_msg		*rsp;
	STAILQ_ENTRY(spdk_nvmf_request)	buf_link;
+0 −15
Original line number Diff line number Diff line
@@ -4546,10 +4546,6 @@ spdk_nvmf_request_exec(struct spdk_nvmf_request *req)
	struct spdk_nvmf_transport *transport = qpair->transport;
	enum spdk_nvmf_request_exec_status status;

	if (req->data != NULL) {
		assert(req->iovcnt > 0);
	}

	if (!nvmf_check_subsystem_active(req)) {
		return;
	}
@@ -4716,17 +4712,6 @@ struct spdk_nvmf_subsystem *spdk_nvmf_request_get_subsystem(struct spdk_nvmf_req
	return req->qpair->ctrlr->subsys;
}

SPDK_LOG_DEPRECATION_REGISTER(nvmf_request_get_data, "spdk_nvmf_request_get_data",
			      "SPDK 23.09", 60);

void
spdk_nvmf_request_get_data(struct spdk_nvmf_request *req, void **data, uint32_t *length)
{
	SPDK_LOG_DEPRECATED(nvmf_request_get_data);
	*data = req->data;
	*length = req->length;
}

size_t
spdk_nvmf_request_copy_from_buf(struct spdk_nvmf_request *req,
				void *buf, size_t buflen)
+0 −3
Original line number Diff line number Diff line
@@ -897,9 +897,6 @@ nvmf_bdev_ctrlr_zcopy_start_complete(struct spdk_bdev_io *bdev_io, bool success,

	assert(req->iov == iov);

	/* backward compatible */
	req->data = req->iov[0].iov_base;

	req->zcopy_bdev_io = bdev_io; /* Preserve the bdev_io for the end zcopy */

	spdk_nvmf_request_complete(req);
Loading