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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A007FC25B08 for ; Wed, 17 Aug 2022 13:19:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239822AbiHQNTy (ORCPT ); Wed, 17 Aug 2022 09:19:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239807AbiHQNTa (ORCPT ); Wed, 17 Aug 2022 09:19:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7963133A20 for ; Wed, 17 Aug 2022 06:18:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BB63C611B9 for ; Wed, 17 Aug 2022 13:18:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 833C2C433D6; Wed, 17 Aug 2022 13:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660742327; bh=ddf7x4YQ3yeCg+JN2UFftGz9J3b+a+5Qa+fwq/w63lk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TYDs1F5MzEbqm4K9YNGdyVORSMPzcUv38y9Pwb+m9M+D4kS8S6YBHMW0pYVEJAPDS ovWKyatIzgcPs14absumBb3bRL8oVSyGjDWeyV3w3iAicry92OaK7usleUoKmXt/Mq q+HNAu72FGpeqUuueCB9v2QiqGswnGM9fSiL+GJDX4lFvbtwIobe18Qoj3qBc9pYOZ Ht2l7cjpn4mOcD3sVo89qzl/R2EJv3spYiCYAVJmtnjsFtcQ/g5Y2/aXyedLUo8lj+ f0h30/vB1sSfTd2VPOq1Hus2mawn9IN2hUDhTrCXxrjl/T5GtIq/QDXuS9Cm5vToCS pEkC8oOFOCDlg== Date: Wed, 17 Aug 2022 15:18:41 +0200 From: Christian Brauner To: Andrey Zhadchenko Cc: netdev@vger.kernel.org, dev@openvswitch.org, pshelar@ovn.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, ptikhomirov@virtuozzo.com, alexander.mikhalitsyn@virtuozzo.com, avagin@google.com Subject: Re: [PATCH net-next 1/1] openvswitch: allow specifying ifindex of new interfaces Message-ID: <20220817131841.frtdyro52bsus2h5@wittgenstein> References: <20220817124909.83373-1-andrey.zhadchenko@virtuozzo.com> <20220817124909.83373-2-andrey.zhadchenko@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220817124909.83373-2-andrey.zhadchenko@virtuozzo.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Aug 17, 2022 at 03:49:09PM +0300, Andrey Zhadchenko wrote: > CRIU is preserving ifindexes of net devices after restoration. However, > current Open vSwitch API does not allow to target ifindex, so we cannot > correctly restore OVS configuration. > > Use ovs_header->dp_ifindex during OVS_DP_CMD_NEW as desired ifindex. > Use OVS_VPORT_ATTR_IFINDEX during OVS_VPORT_CMD_NEW to specify new netdev > ifindex. > > Signed-off-by: Andrey Zhadchenko > --- I think specifying the index at device creation time is a good idea and iirc then we do allow this for veth devices already. So I'd be happy to see this go forwad.