-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23089/#review46802
-----------------------------------------------------------
5 byte prefix is fine, but could potentially break. See the email discussion
from some time ago: (if only mesos had a 4 character name:)
-------------------
::recover(id, pid):
A design decision here is to use pid to compose the name of the host
side interface of the veth pair: eth{pid}. (Could this be too long for
a eth device name?)
You have 15 bytes for the name. A pid can is a 32 bit number so can use 11 of
those bytes. So there are 4 bytes for a prefix.
so eth{pid} will work but I don't think we want to use eth as a prefix. Some
other
3 or 4 letter prefix that does not suggest a physical ethernet interface is
likely better.
what about veth?
I like veth ;-)
pid_t is int but actual pids are only 0-65536 aren't they? so 5 characters is
sufficient.
It depends in practice on /proc/sys/kernel/pid_max. The current implementation
maximum is 2^22 aka 4194304 but I hate to bake that limit into anything.
Better to assume that the whole 32 bit range might be used.
- Chi Zhang
On June 26, 2014, 9:10 p.m., Jie Yu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23089/
> -----------------------------------------------------------
>
> (Updated June 26, 2014, 9:10 p.m.)
>
>
> Review request for mesos and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> See summary.
>
>
> Diffs
> -----
>
> src/slave/containerizer/isolators/network/port_mapping.hpp 9ef28bc
> src/slave/containerizer/isolators/network/port_mapping.cpp 6f8dd17
> src/tests/isolator_tests.cpp a07142c
>
> Diff: https://reviews.apache.org/r/23089/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Jie Yu
>
>