Commit 95fc5d35 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

iscsi: Remove SPDK_ISCSI_MAX_SEND_DATA_SEGMENT_LENGTH



In iSCSI, SPDK_ISCSI_MAX_SEND_DATA_SEGMENT_LENGTH was an alias
of SPDK_BDEV_LARGE_BUF_MAX_SIZE.

iSCSI had used both interchangeably.

SPDK_BDEV_LARGE_BUF_MAX_SIZE means the buffer size of the large
buffer pool in generic bdev layer, and will be changed to be
configurable.

SPDK_ISCSI_MAX_SEND_DATA_SEGMENT_LENGTH had been used to negotiate
MaxRecvDataSegmentLength with iSCSI initiator and to split large
read data, but both are determined by not iSCSI target but generic
bdev layer.

Hence this patch replaces SPDK_ISCSI_MAX_SEND_DATA_SEGMENT_LENGTH
by SPDK_BDEV_LARGE_BUF_MAX_SIZE.

Change-Id: I822a5203a5092fe8b2d1ca3f93423f1acbfc782e
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/444539


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent d0efddd2
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -82,12 +82,6 @@
 */
#define SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH  65536

/*
 * SPDK iSCSI target will only send a maximum of SPDK_BDEV_LARGE_BUF_MAX_SIZE data segments, even if the
 * connection can support more.
 */
#define SPDK_ISCSI_MAX_SEND_DATA_SEGMENT_LENGTH SPDK_BDEV_LARGE_BUF_MAX_SIZE

/*
 * Defines maximum number of data out buffers each connection can have in
 *  use at any given time.
+2 −2
Original line number Diff line number Diff line
@@ -1128,8 +1128,8 @@ spdk_iscsi_copy_param2var(struct spdk_iscsi_conn *conn)
	SPDK_DEBUGLOG(SPDK_LOG_ISCSI,
		      "copy MaxRecvDataSegmentLength=%s\n", val);
	conn->MaxRecvDataSegmentLength = (int)strtol(val, NULL, 10);
	if (conn->MaxRecvDataSegmentLength > SPDK_ISCSI_MAX_SEND_DATA_SEGMENT_LENGTH) {
		conn->MaxRecvDataSegmentLength = SPDK_ISCSI_MAX_SEND_DATA_SEGMENT_LENGTH;
	if (conn->MaxRecvDataSegmentLength > SPDK_BDEV_LARGE_BUF_MAX_SIZE) {
		conn->MaxRecvDataSegmentLength = SPDK_BDEV_LARGE_BUF_MAX_SIZE;
	}

	val = spdk_iscsi_param_get_val(conn->params, "HeaderDigest");