Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Mike Christie and committed by
James Bottomley
bf32ed33 05db888a

+16 -6
+1 -1
drivers/infiniband/ulp/iser/iser_initiator.c
··· 201 201 * what's common for both schemes is that the connection is not started 202 202 */ 203 203 if (conn->c_stage != ISCSI_CONN_STARTED) 204 - rx_data_size = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; 204 + rx_data_size = ISCSI_DEF_MAX_RECV_SEG_LEN; 205 205 else /* FIXME till user space sets conn->max_recv_dlength correctly */ 206 206 rx_data_size = 128; 207 207
+3 -3
drivers/scsi/iscsi_tcp.c
··· 527 527 * than 8K, but there are no targets that currently do this. 528 528 * For now we fail until we find a vendor that needs it 529 529 */ 530 - if (DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH < 530 + if (ISCSI_DEF_MAX_RECV_SEG_LEN < 531 531 tcp_conn->in.datalen) { 532 532 printk(KERN_ERR "iscsi_tcp: received buffer of len %u " 533 533 "but conn buffer is only %u (opcode %0x)\n", 534 534 tcp_conn->in.datalen, 535 - DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH, opcode); 535 + ISCSI_DEF_MAX_RECV_SEG_LEN, opcode); 536 536 rc = ISCSI_ERR_PROTO; 537 537 break; 538 538 } ··· 1762 1762 * due to strange issues with iser these are not set 1763 1763 * in iscsi_conn_setup 1764 1764 */ 1765 - conn->max_recv_dlength = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; 1765 + conn->max_recv_dlength = ISCSI_DEF_MAX_RECV_SEG_LEN; 1766 1766 1767 1767 tcp_conn = kzalloc(sizeof(*tcp_conn), GFP_KERNEL); 1768 1768 if (!tcp_conn)
+1 -1
drivers/scsi/libiscsi.c
··· 1520 1520 } 1521 1521 spin_unlock_bh(&session->lock); 1522 1522 1523 - data = kmalloc(DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH, GFP_KERNEL); 1523 + data = kmalloc(ISCSI_DEF_MAX_RECV_SEG_LEN, GFP_KERNEL); 1524 1524 if (!data) 1525 1525 goto login_mtask_data_alloc_fail; 1526 1526 conn->login_mtask->data = conn->data = data;
+11 -1
include/scsi/iscsi_proto.h
··· 588 588 #define VALUE_MAXLEN 255 589 589 #define TARGET_NAME_MAXLEN VALUE_MAXLEN 590 590 591 - #define DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH 8192 591 + #define ISCSI_DEF_MAX_RECV_SEG_LEN 8192 592 + #define ISCSI_MIN_MAX_RECV_SEG_LEN 512 593 + #define ISCSI_MAX_MAX_RECV_SEG_LEN 16777215 594 + 595 + #define ISCSI_DEF_FIRST_BURST_LEN 65536 596 + #define ISCSI_MIN_FIRST_BURST_LEN 512 597 + #define ISCSI_MAX_FIRST_BURST_LEN 16777215 598 + 599 + #define ISCSI_DEF_MAX_BURST_LEN 262144 600 + #define ISCSI_MIN_MAX_BURST_LEN 512 601 + #define ISCSI_MAX_MAX_BURST_LEN 16777215 592 602 593 603 /************************* RFC 3720 End *****************************/ 594 604