iscsi-target: Enable MaxXmitDataSegmentLength operation in login path
authorNicholas Bellinger <nab@linux-iscsi.org>
Sun, 30 Sep 2012 04:49:59 +0000 (21:49 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 2 Oct 2012 20:17:31 +0000 (13:17 -0700)
commit9977bb18c92e694819266fc0e7c5a3cd0cd7b626
treefbcda9f670923c683971da2613645e1693d0210d
parente004cb25927ad7a67c109ac13e1d2e5e378430dd
iscsi-target: Enable MaxXmitDataSegmentLength operation in login path

This patch activates MaxXmitDataSegmentLength usage that performs the
following sequence of events:

- Once the incoming initiator's MAXRECVDATASEGMENTLENGTH key is detected
  within iscsi_check_acceptor_state(), save the requested MRDSL into
  conn->conn_ops->MaxRecvDataSegmentLength

- Next change the outgoing target's MaxRecvDataSegmenthLength key=value
  based upon the local TPG's MaxXmitDataSegmentLength attribute value.

- Change iscsi_set_connection_parameters() to skip the assignment of
  conn->conn_ops->MaxRecvDataSegmentLength, now setup within
  iscsi_check_acceptor_state()

Also update iscsi_decode_text_input() -> iscsi_check_acceptor_state()
code-path to accept struct iscsi_conn *.

Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: Andy Grover <agrover@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_nego.c
drivers/target/iscsi/iscsi_target_parameters.c
drivers/target/iscsi/iscsi_target_parameters.h