[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: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Родитель
05db888a46
Коммит
bf32ed33e9
|
@ -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
|
||||
*/
|
||||
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 */
|
||||
rx_data_size = 128;
|
||||
|
||||
|
|
|
@ -527,12 +527,12 @@ iscsi_tcp_hdr_recv(struct iscsi_conn *conn)
|
|||
* than 8K, but there are no targets that currently do this.
|
||||
* 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) {
|
||||
printk(KERN_ERR "iscsi_tcp: received buffer of len %u "
|
||||
"but conn buffer is only %u (opcode %0x)\n",
|
||||
tcp_conn->in.datalen,
|
||||
DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH, opcode);
|
||||
ISCSI_DEF_MAX_RECV_SEG_LEN, opcode);
|
||||
rc = ISCSI_ERR_PROTO;
|
||||
break;
|
||||
}
|
||||
|
@ -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
|
||||
* 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);
|
||||
if (!tcp_conn)
|
||||
|
|
|
@ -1520,7 +1520,7 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
|
|||
}
|
||||
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)
|
||||
goto login_mtask_data_alloc_fail;
|
||||
conn->login_mtask->data = conn->data = data;
|
||||
|
|
|
@ -588,7 +588,17 @@ struct iscsi_reject {
|
|||
#define VALUE_MAXLEN 255
|
||||
#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 *****************************/
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче