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>
This commit is contained in:
parent
f7650d82e7
commit
54c4ef34c4
4 changed files with 15 additions and 2 deletions
|
|
@ -76,6 +76,8 @@ enum ovs_datapath_cmd {
|
|||
* datapath. Always present in notifications.
|
||||
* @OVS_DP_ATTR_MEGAFLOW_STATS: Statistics about mega flow masks usage for the
|
||||
* datapath. Always present in notifications.
|
||||
* @OVS_DP_ATTR_IFINDEX: Interface index for a new datapath netdev. Only
|
||||
* valid for %OVS_DP_CMD_NEW requests.
|
||||
*
|
||||
* These attributes follow the &struct ovs_header within the Generic Netlink
|
||||
* payload for %OVS_DP_* commands.
|
||||
|
|
@ -92,6 +94,7 @@ enum ovs_datapath_attr {
|
|||
OVS_DP_ATTR_PER_CPU_PIDS, /* Netlink PIDS to receive upcalls in
|
||||
* per-cpu dispatch mode
|
||||
*/
|
||||
OVS_DP_ATTR_IFINDEX,
|
||||
__OVS_DP_ATTR_MAX
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue