From 95fc5d35816b4112d902ce23b812496af326b7a7 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Tue, 19 Feb 2019 07:57:30 +0900 Subject: [PATCH] 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: Shuhei Matsumoto Reviewed-on: https://review.gerrithub.io/c/444539 Tested-by: SPDK CI Jenkins Reviewed-by: Darek Stojaczyk Reviewed-by: Jim Harris --- lib/iscsi/iscsi.h | 6 ------ lib/iscsi/param.c | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/iscsi/iscsi.h b/lib/iscsi/iscsi.h index f56cf6c4a..b9301df0f 100644 --- a/lib/iscsi/iscsi.h +++ b/lib/iscsi/iscsi.h @@ -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. diff --git a/lib/iscsi/param.c b/lib/iscsi/param.c index 7c67d2c2e..b90cf879c 100644 --- a/lib/iscsi/param.c +++ b/lib/iscsi/param.c @@ -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");