SMB2/3 Credits (Multi-Credit) support

Stefan (metze) Metzmacher metze at
Wed Jun 27 12:58:21 MDT 2012

Hi Jeremy,

while reviewing the multi-credit code that already went to master
a few weeks ago, I noticed some missing details in the multi-credit code.

While debugging this I found some bugs in our credit handling code.

I spend a lot of time testing against Windows 2012 RC.
I think the code in this branch, let us behave almost like a windows server.;a=shortlog;h=refs/heads/master3-credits

The most important thing is that windows 2012 RC allows up to 8192 credits
(also our default), but it normally it only grants up to (8192/16) = 512

If the client uses very large credit-charge values (e.g. using all 512
(or 256) credits just for one request)
I'm able to get up to 8192 credits after a while.

Note that it's only useful for a client to use up to 15 credits per
request (for 1MB reads/writes).

With my patches we only grant up to (8192/16) = 512 credits,
adding more dynamic crediting between 512 and 8192 later.

I'll do some more testing tomorrow, then I plan to push this to master
(it already passed a private autobuild once).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the samba-technical mailing list