cifs: Limit the overall credit acquired
[firefly-linux-kernel-4.4.55.git] / fs / cifs / smb2glob.h
index 0ffa180943357c5514b5ae025f61e4b19f574f38..238759c146badd9eddc372e31c558ec948647343 100644 (file)
 /* Maximum buffer size value we can send with 1 credit */
 #define SMB2_MAX_BUFFER_SIZE 65536
 
+/*
+ * Maximum number of credits to keep available.
+ * This value is chosen somewhat arbitrarily. The Windows client
+ * defaults to 128 credits, the Windows server allows clients up to
+ * 512 credits, and the NetApp server does not limit clients at all.
+ * Choose a high enough value such that the client shouldn't limit
+ * performance.
+ */
+#define SMB2_MAX_CREDITS_AVAILABLE 32000
+
 #endif /* _SMB2_GLOB_H */