[CRIU] [PATCH v2 1/8] add netns protobuf entry and image, also add conf to net device entry

Pavel Tikhomirov ptikhomirov at parallels.com
Tue Sep 30 21:50:15 PDT 2014


On 09/30/2014 05:31 PM, Pavel Emelyanov wrote:
> On 09/27/2014 01:22 AM, Pavel Emelyanov wrote:
>> On 09/27/2014 01:06 AM, Pavel Emelyanov wrote:
>>> On 09/26/2014 04:45 PM, Pavel Tikhomirov wrote:
>>>> On 09/26/2014 09:53 AM, Pavel Emelyanov wrote:
>>>>> On 09/25/2014 12:00 PM, Pavel Tikhomirov wrote:
>>>>>
>>>>>> diff --git a/protobuf-desc.c b/protobuf-desc.c
>>>>>> index b97418b..61891e0 100644
>>>>>> --- a/protobuf-desc.c
>>>>>> +++ b/protobuf-desc.c
>>>>>> @@ -94,6 +94,7 @@ void cr_pb_init(void)
>>>>>>    	CR_PB_DESC(IPCNS_MSG_ENT,	IpcMsg,		ipc_msg);
>>>>>>    	CR_PB_DESC(REMAP_FPATH,		RemapFilePath,	remap_file_path);
>>>>>>    	CR_PB_DESC(NETDEV,		NetDevice,	net_device);
>>>>>> +	CR_PB_DESC(NETNS,		Netns,		netns);
>>>>> If you put the PB_NETNS between the *AUTOGEN* comments in the enum
>>>>> this line would not be needed.
>>>>>
>>>>>>    	CR_PB_MDESC_INIT(cr_pb_descs[PB_PAGEMAP_HEAD],	PagemapHead,	pagemap_head);
>>>>>>    
>>>>>>    #include "protobuf-desc-gen.h"
>>>>>> diff --git a/protobuf/netdev.proto b/protobuf/netdev.proto
>>>>>> index 4fa23d3..afe76a1 100644
>>>>>> --- a/protobuf/netdev.proto
>>>>>> +++ b/protobuf/netdev.proto
>>>>>> @@ -23,4 +23,11 @@ message net_device_entry {
>>>>>>    	optional tun_link_entry tun	= 6;
>>>>>>    
>>>>>>    	optional bytes address		= 7;
>>>>>> +
>>>>>> +	repeated int32 conf		= 8;
>>>>>> +}
>>>>>> +
>>>>>> +message netns_entry {
>>>>>> +	repeated int32 def_conf		= 1;
>>>>>> +	repeated int32 all_conf		= 2;
>>>>> The "all" is not required, it's not status sysctl, but the behavior one.
>>>>> When you write to it all devices get their setting updated :)
>>>> Hm.., try:
>>>> sudo sysctl net.ipv4.conf.lo.disable_policy=0
>>>> sysctl net.ipv4.conf.all.disable_policy=1
>>>> cat /proc/sys/net/ipv4/conf/lo/disable_policy
>>>>   >0
>>>> I hope that "all" just act like a mask.
>>> It's not. "All" should propagate the set up value to all other devices.
>>> "Default" is what newly created device would accept. If this doesn't
>>> work, report this on the netdev@, things probably got broken :(
>> Wait a second, it looks like I'm wrong.
>>
> OK, we need all of them. But the restore should go like
>
> 	1. default
> 	2. all
> 	3. devices
>
> Does it?
Now it is 3-1-2, I'll resend with correction.
>
> Thanks,
> Pavel
>

-- 
Best regards, Tikhomirov Pavel
Junior Software Developer || Parallels.



More information about the CRIU mailing list