[Tarantool-patches] [PATCH 14/16] sio: increase SERVICE_NAME_MAXLEN size

Cyrill Gorcunov gorcunov at gmail.com
Mon Mar 22 00:58:26 MSK 2021


On Sat, Mar 20, 2021 at 01:42:36AM +0100, Vladislav Shpilevoy wrote:
>  
> -enum { SERVICE_NAME_MAXLEN = 32 };
> +enum {
> +	/**
> +	 * - Unix socket path is 108 bytes max;
> +	 * - IP(v4, v6) max string len is 45;

Actually IPv6 may include a scope as well. Currently at least
libc indeed does limit it to 45 symbols plus eos mark so we're
safe. Still 200 seems to be much over the top, maybe 128 instead?
Also pow2 gonna be easier to manage by any memory manager.
I don't insist though just a thought and this could be tuned up
on top.


More information about the Tarantool-patches mailing list