Commit bf32ed33 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[SCSI] iscsi: rename DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH

This patch renames DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH to avoid
confusion with the drivers default values (DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH
is the iscsi RFC specific default).
Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 05db888a
...@@ -201,7 +201,7 @@ static int iser_post_receive_control(struct iscsi_conn *conn) ...@@ -201,7 +201,7 @@ static int iser_post_receive_control(struct iscsi_conn *conn)
* what's common for both schemes is that the connection is not started * what's common for both schemes is that the connection is not started
*/ */
if (conn->c_stage != ISCSI_CONN_STARTED) if (conn->c_stage != ISCSI_CONN_STARTED)
rx_data_size = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; rx_data_size = ISCSI_DEF_MAX_RECV_SEG_LEN;
else /* FIXME till user space sets conn->max_recv_dlength correctly */ else /* FIXME till user space sets conn->max_recv_dlength correctly */
rx_data_size = 128; rx_data_size = 128;
......
...@@ -527,12 +527,12 @@ iscsi_tcp_hdr_recv(struct iscsi_conn *conn) ...@@ -527,12 +527,12 @@ iscsi_tcp_hdr_recv(struct iscsi_conn *conn)
* than 8K, but there are no targets that currently do this. * than 8K, but there are no targets that currently do this.
* For now we fail until we find a vendor that needs it * For now we fail until we find a vendor that needs it
*/ */
if (DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH < if (ISCSI_DEF_MAX_RECV_SEG_LEN <
tcp_conn->in.datalen) { tcp_conn->in.datalen) {
printk(KERN_ERR "iscsi_tcp: received buffer of len %u " printk(KERN_ERR "iscsi_tcp: received buffer of len %u "
"but conn buffer is only %u (opcode %0x)\n", "but conn buffer is only %u (opcode %0x)\n",
tcp_conn->in.datalen, tcp_conn->in.datalen,
DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH, opcode); ISCSI_DEF_MAX_RECV_SEG_LEN, opcode);
rc = ISCSI_ERR_PROTO; rc = ISCSI_ERR_PROTO;
break; break;
} }
...@@ -1762,7 +1762,7 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) ...@@ -1762,7 +1762,7 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
* due to strange issues with iser these are not set * due to strange issues with iser these are not set
* in iscsi_conn_setup * in iscsi_conn_setup
*/ */
conn->max_recv_dlength = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; conn->max_recv_dlength = ISCSI_DEF_MAX_RECV_SEG_LEN;
tcp_conn = kzalloc(sizeof(*tcp_conn), GFP_KERNEL); tcp_conn = kzalloc(sizeof(*tcp_conn), GFP_KERNEL);
if (!tcp_conn) if (!tcp_conn)
......
...@@ -1520,7 +1520,7 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, uint32_t conn_idx) ...@@ -1520,7 +1520,7 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
} }
spin_unlock_bh(&session->lock); spin_unlock_bh(&session->lock);
data = kmalloc(DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH, GFP_KERNEL); data = kmalloc(ISCSI_DEF_MAX_RECV_SEG_LEN, GFP_KERNEL);
if (!data) if (!data)
goto login_mtask_data_alloc_fail; goto login_mtask_data_alloc_fail;
conn->login_mtask->data = conn->data = data; conn->login_mtask->data = conn->data = data;
......
...@@ -588,7 +588,17 @@ struct iscsi_reject { ...@@ -588,7 +588,17 @@ struct iscsi_reject {
#define VALUE_MAXLEN 255 #define VALUE_MAXLEN 255
#define TARGET_NAME_MAXLEN VALUE_MAXLEN #define TARGET_NAME_MAXLEN VALUE_MAXLEN
#define DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH 8192 #define ISCSI_DEF_MAX_RECV_SEG_LEN 8192
#define ISCSI_MIN_MAX_RECV_SEG_LEN 512
#define ISCSI_MAX_MAX_RECV_SEG_LEN 16777215
#define ISCSI_DEF_FIRST_BURST_LEN 65536
#define ISCSI_MIN_FIRST_BURST_LEN 512
#define ISCSI_MAX_FIRST_BURST_LEN 16777215
#define ISCSI_DEF_MAX_BURST_LEN 262144
#define ISCSI_MIN_MAX_BURST_LEN 512
#define ISCSI_MAX_MAX_BURST_LEN 16777215
/************************* RFC 3720 End *****************************/ /************************* RFC 3720 End *****************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment