ISCSIServer.Parameters.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. /// <summary>
  38. /// per direction parameter that the target or initator declares.
  39. /// maximum data segment length that the target (or initator) can receive in a single iSCSI PDU.
  40. /// </summary>
  41. public static int MaxRecvDataSegmentLength = 262144;
  42. }
  43. }
  44. }