ISCSIServer.Parameters.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* Copyright (C) 2012-2016 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  2. *
  3. * You can redistribute this program and/or modify it under the terms of
  4. * the GNU Lesser Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. */
  7. using System;
  8. namespace ISCSI.Server
  9. {
  10. public partial class ISCSIServer
  11. {
  12. /// <summary>
  13. /// - CommandQueueSize = 0 means the initiator can send one command at a time (because MaxCmdSN = ExpCmdSN + CommandQueueSize),
  14. /// (in this case there won't be any queue following the currently processed command).
  15. /// - Over a low-latency connection, most of the gain comes from increasing the queue size from 0 to 1
  16. /// - CmdSN is session wide, so CommandQueueSize is a session parameter.
  17. /// </summary>
  18. public static uint DefaultCommandQueueSize = 64;
  19. public class DesiredParameters
  20. {
  21. // Session parameters that will be offered to the initiator:
  22. public static int MaxConnections = 1; // implementation limit
  23. public static bool InitialR2T = false;
  24. public static bool ImmediateData = true;
  25. public static int MaxBurstLength = DefaultParameters.Session.MaxBurstLength;
  26. public static int FirstBurstLength = DefaultParameters.Session.FirstBurstLength;
  27. public static int DefaultTime2Wait = 0;
  28. public static int DefaultTime2Retain = 20;
  29. public static int MaxOutstandingR2T = 16;
  30. public static bool DataPDUInOrder = true; // implementation limit
  31. public static bool DataSequenceInOrder = true; // implementation limit
  32. public static int ErrorRecoveryLevel = 0; // implementation limit
  33. }
  34. public class DeclaredParameters
  35. {
  36. // Connection parameters:
  37. public static int MaxRecvDataSegmentLength = 262144;
  38. }
  39. }
  40. }