Create constants for MaxRecvDataSegmentLength and MaxBurstLength

This commit is contained in:
Payes
2017-04-21 13:41:52 +05:30
parent 0b629a16fe
commit 6deca56487
2 changed files with 7 additions and 2 deletions

View File

@@ -33,6 +33,11 @@ const (
OpReject = 0x3f
)
const (
MaxBurstLength uint32 = 262144
MaxRecvDataSegmentLength uint32 = 65536
)
var opCodeMap = map[OpCode]string{
OpNoopOut: "NOP-Out",
OpSCSICmd: "SCSI Command",

View File

@@ -330,8 +330,8 @@ func (s *ISCSITargetDriver) iscsiExecLogin(conn *iscsiConnection) error {
conn.loginParam.isid = cmd.ISID
conn.loginParam.tsih = cmd.TSIH
conn.expCmdSN = cmd.CmdSN
conn.maxBurstLength = 262144
conn.maxRecvDataSegmentLength = 65536
conn.maxBurstLength = MaxBurstLength
conn.maxRecvDataSegmentLength = MaxRecvDataSegmentLength
conn.maxSeqCount = conn.maxBurstLength / conn.maxRecvDataSegmentLength
if conn.loginParam.iniCSG == SecurityNegotiation {