]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: allow specifying ifindex of new interfaces
authorAndrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
Thu, 25 Aug 2022 02:04:49 +0000 (05:04 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 27 Aug 2022 02:31:20 +0000 (19:31 -0700)
commit3ce5c4b7a1330e42a22bad629ca7b2cf8fd9013a
treea1c338032c23fbc37da0c74026eb9e03dcbe99af
parent0276a6ece32d48a7412e5223e4f228846b411b3d
openvswitch: allow specifying ifindex of new interfaces

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.

Add new OVS_DP_ATTR_IFINDEX for OVS_DP_CMD_NEW and use it as desired
ifindex.
Use OVS_VPORT_ATTR_IFINDEX during OVS_VPORT_CMD_NEW to specify new netdev
ifindex.

Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/uapi/linux/openvswitch.h
net/openvswitch/datapath.c
net/openvswitch/vport-internal_dev.c
net/openvswitch/vport.h