On Tue, Apr 06, 2021 at 12:54:48AM -0700, Andrei Vagin wrote:
> Currently, we can specify ifindex on link creation. This change allows
> to specify ifindex when a device is moved to another network namespace.
> 
> Even now, a device ifindex can be changed if there is another device
> with the same ifindex in the target namespace. So this change doesn't
> introduce completely new behavior, it adds more control to the process.
> 
> CRIU users want to restore containers with pre-created network devices.
> A user will provide network devices and instructions where they have to
> be restored, then CRIU will restore network namespaces and move devices
> into them. The problem is that devices have to be restored with the same
> indexes that they have before C/R.
> 
> Cc: Alexander Mikhalitsyn <alexander.mikhalit...@virtuozzo.com>
> Suggested-by: Christian Brauner <christian.brau...@ubuntu.com>
> Reviewed-by: Christian Brauner <christian.brau...@ubuntu.com>
> Signed-off-by: Andrei Vagin <ava...@gmail.com>
> ---

I've compiled a kernel with this patch and was able to successfully dump
and restore a container which relies on pre-created network devices that
need to be moved into a target network namespace with a specific
ifindex. The pull-request making use of the feature in this patch can be
found here:

https://github.com/checkpoint-restore/criu/pull/1432

Thanks!
(Always happy with the fast and painless processes in net[-next]!)
Christian

Reply via email to