[PATCH] Add -e encryption support to SMB3 client protocol support, plus documentation updates.

Jeremy Allison jra at samba.org
Wed Aug 21 10:36:59 MDT 2013


On Wed, Aug 21, 2013 at 05:03:52PM +0200, Michael Adam wrote:
> 
> It seems to me from looking at captures that
> with SMB1, I always get 0x4000 byte writes
> and 0xFC00 reads, irrespective of the iosize
> setting, but more parallelised when using a
> higher value or 0.
> (Observed running a thus patched smbclient
> against a plain w2k8r2.)

The iosize is setting the "window" that
is used for parallelization. I think setting
it smaller than the minimum write size (0x4000)
on SMB1 is probably being mapped to the minimum
inside the clireadwrite.c code.

> Also using SMB2+, I don't see different write
> or read lengths when using other values than 0,
> but different parallelism. Am I asking stupid
> questions?...

Nope - that's the fact that iosize is the window,
not the actual read/write size.

> But you can still set it to a positive value
> bigger than 0xFFFF00 for SMB2+ and with a
> different effect than setting 0xFFFF00, right?

Yes, but setting it to anything other than
zero for SMB2 is essentially slowing things
down. Zero means the client dynamically adapts
the window size based on the available credits.

> OK, because the problems I mentioned above
> are rather in the preliminary lower level patches
> than in the present patchset itself, I review+
> the patches and am bringing them to autobuild!
> 
> Attached find a follow-up patch that adds a
> missing newline to the error messages for
> out of bounds iosize value (they were missing
> before your patch already, hence the proposed
> extra commit).

Thanks ! I'll add this into the jumbo set and
make sure it gets into autobuild.

Cheers,

	Jeremy

> From a576e4e5921cde7e0c161c181b36b2db2b76a80f Mon Sep 17 00:00:00 2001
> From: Michael Adam <obnox at samba.org>
> Date: Wed, 21 Aug 2013 16:12:30 +0200
> Subject: [PATCH] client: add missing newlines to error messages for invalid
>  iosize parameter.
> 
> Signed-off-by: Michael Adam <obnox at samba.org>
> ---
>  source3/client/client.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/source3/client/client.c b/source3/client/client.c
> index 581b9c6..bdf6c50 100644
> --- a/source3/client/client.c
> +++ b/source3/client/client.c
> @@ -4551,11 +4551,11 @@ int cmd_iosize(void)
>  		if (smb_encrypt && (iosize < 0 || iosize > 0xFC00)) {
>  			d_printf("iosize out of range for encrypted "
>  				"connection (min = 0 (default), "
> -				"max = 130048 (0x1FC00)");
> +				"max = 130048 (0x1FC00)\n");
>  			return 1;
>  		} else if (!smb_encrypt && (iosize < 0 || iosize > 0xFFFF00)) {
>  			d_printf("iosize out of range (min = 0 (default), "
> -				"max = 16776960 (0xFFFF00)");
> +				"max = 16776960 (0xFFFF00)\n");
>  			return 1;
>  		}
>  	}
> -- 
> 1.7.9.5
> 





More information about the samba-technical mailing list