Granting Credits to the Client

As described in section, the server maintains a list of message identifiers available for incoming requests. The total number of available message identifiers can change dynamically as the system runs, with the server granting credits based on some local policy.

Based on the CreditRequest specified in the SMB2 header of a client request, the server MUST determine how many credits it will grant the client on each request by using a vendor-specific algorithm as specified in section The server MUST then place the number of credits granted in the CreditResponse field in the SMB2 header of the response.

The server consumes one credit for any request except for the SMB2 CANCEL Request. If the server implements the SMB 2.1 or SMB 3.x dialect family and the request is a multi-credit request, the server MUST consume multiple credits as specified in section To maintain the same number of credits already granted, the server returns a value equal to the number of credits consumed by this command. To reduce or increase the number of credits granted, the server respectively returns a value less than or greater than the number of credits consumed by this command. 

For an asynchronously processed request, any credits to be granted MUST be granted in the interim response, as specified in section<199>