From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A6BCC433ED for ; Mon, 5 Apr 2021 12:15:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5060F613B0 for ; Mon, 5 Apr 2021 12:15:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235445AbhDEMPX (ORCPT ); Mon, 5 Apr 2021 08:15:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:37422 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233156AbhDEMPW (ORCPT ); Mon, 5 Apr 2021 08:15:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 04505613A9; Mon, 5 Apr 2021 12:15:13 +0000 (UTC) Date: Mon, 5 Apr 2021 14:15:10 +0200 From: Christian Brauner To: Andrei Vagin Cc: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Alexander Mikhalitsyn Subject: Re: [PATCH] net: Allow to specify ifindex when device is moved to another namespace Message-ID: <20210405121510.zvfqkuxk56oncaxk@wittgenstein> References: <20210402073622.1260310-1-avagin@gmail.com> <20210405071223.138101-1-avagin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210405071223.138101-1-avagin@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Apr 05, 2021 at 12:12:23AM -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 > Suggested-by: Christian Brauner > Signed-off-by: Andrei Vagin > --- LGTM. Thank for doing this! Reviewed-by: Christian Brauner