From 80fd917004e6ffe326bb50577317dabd6cdd8545 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Thu, 14 Feb 2019 16:24:48 +0900 Subject: [PATCH] iscsi: Rename macro constant MAX_FIRSTBURSTLENGTH by SPDK_ISCSI_MAX_FIRST_BURST_LENGTH Change-Id: If3e2ded87dab5c6596ec499460f7d233bf63154e Signed-off-by: Shuhei Matsumoto Reviewed-on: https://review.gerrithub.io/c/444536 Tested-by: SPDK CI Jenkins Reviewed-by: Pawel Wodkowski Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/iscsi/iscsi.h | 3 ++- lib/iscsi/param.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/iscsi/iscsi.h b/lib/iscsi/iscsi.h index b9115986b..ad7b1bc02 100644 --- a/lib/iscsi/iscsi.h +++ b/lib/iscsi/iscsi.h @@ -59,7 +59,6 @@ #define MAX_INITIATOR 256 #define MAX_NETMASK 256 #define MAX_ISCSI_CONNECTIONS 1024 -#define MAX_FIRSTBURSTLENGTH 16777215 #define DEFAULT_PORT 3260 #define DEFAULT_MAX_SESSIONS 128 @@ -125,6 +124,8 @@ */ #define SPDK_ISCSI_MIN_FIRST_BURST_LENGTH 512 +#define SPDK_ISCSI_MAX_FIRST_BURST_LENGTH 16777215 + /** Defines how long we should wait for a TCP close after responding to a * logout request, before terminating the connection ourselves. */ diff --git a/lib/iscsi/param.c b/lib/iscsi/param.c index c6531f2e4..7c67d2c2e 100644 --- a/lib/iscsi/param.c +++ b/lib/iscsi/param.c @@ -1055,7 +1055,7 @@ spdk_iscsi_negotiate_params(struct spdk_iscsi_conn *conn, } else { MaxBurstLength = SPDK_ISCSI_MAX_BURST_LENGTH; } - if (FirstBurstLength < MAX_FIRSTBURSTLENGTH && + if (FirstBurstLength < SPDK_ISCSI_MAX_FIRST_BURST_LENGTH && FirstBurstLength > MaxBurstLength) { FirstBurstLength = MaxBurstLength; snprintf(in_val, ISCSI_TEXT_MAX_VAL_LEN, "%d",