]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'openvswitch-allow-specifying-ifindex-of-new-interfaces'
authorJakub Kicinski <kuba@kernel.org>
Sat, 27 Aug 2022 02:31:23 +0000 (19:31 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 27 Aug 2022 02:31:23 +0000 (19:31 -0700)
commit65592f3f9c396b8c4ca8a93288e7e1f4a4f5248c
tree9d4f28353719840bae6d488edad6bf534cabadd4
parent0276a6ece32d48a7412e5223e4f228846b411b3d
parent841a163ba154174a1f16fdab00a69d30937755d8
Merge branch 'openvswitch-allow-specifying-ifindex-of-new-interfaces'

Andrey Zhadchenko says:

====================
openvswitch: allow specifying ifindex of new interfaces

CRIU currently do not support checkpoint/restore of OVS configurations, but
there was several requests for it. For example,
https://github.com/lxc/lxc/issues/2909

The main problem is ifindexes of newly created interfaces. We realy need to
preserve them after restore. Current openvswitch API does not allow to
specify ifindex. Most of the time we can just create an interface via
generic netlink requests and plug it into ovs but datapaths (generally any
OVS_VPORT_TYPE_INTERNAL) can only be created via openvswitch requests which
do not support selecting ifindex.

This patch allows to do so.
For new datapaths I decided to use dp_infindex in header as infindex
because it control ifindex for other requests too.
For internal vports I reused OVS_VPORT_ATTR_IFINDEX.

The only concern I have is that previously dp_ifindex was not used for
OVS_DP_VMD_NEW requests and some software may not set it to zero. However
we have been running this patch at Virtuozzo for 2 years and have not
encountered this problem. Not sure if it is worth to add new
ovs_datapath_attr instead.
====================

Link: https://lore.kernel.org/r/20220825020450.664147-1-andrey.zhadchenko@virtuozzo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>