[CRIU] [PATCH 03/12] soccr/tcp: Add _pause and _resume to library and use it

Pavel Emelyanov xemul at virtuozzo.com
Fri Aug 5 08:59:50 PDT 2016


On 08/05/2016 06:43 PM, Dmitry Safonov wrote:
> On 08/05/2016 05:59 PM, Pavel Emelyanov wrote:
>> The calls put socket into a mode where it can be saved or
>> restored. Add take one out of this mode.
>>
>> TODO: In criu we turn repair off (resume the socket) from
>> restorer blob that cannot use the library. Need to somehow
>> fix it.
>>
>> Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
> 
> So, if we generate _static_ library for now -- is there an issue, that
> prevents compiling it into restorer object blob? The size of library?

Absence of glibc in the restorer blob :)

> Or you prefer to make the library shared firstly and then to think what 
> to do with dlopen() or how to compile it into the blob? What's the plan?
> Or I didn't understand the issue correctly :)

The issue is that in restorer there's a call to setsocopt(sk, TCP_REPAIR, 0)
which is equals to libsoccr's tcp_repair_off() routine.

This could be solved by linking libsoccr into restorer, but we don't have
glibc there and thus libsoccr would have to be equipped with #ifdefs to
help using either glibc's setsocktopt or sys_setsockopt.

And the latter is overkill for a single call. All the more so the library
is not for internal criu usage, I will make it .so soon to let other people
play with socket C/R only.

-- Pavel



More information about the CRIU mailing list