summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/openvswitch.h
diff options
context:
space:
mode:
authorJiri Benc2017-11-02 20:04:37 +0100
committerDavid S. Miller2017-11-05 13:49:17 +0100
commit9354d452034273a50a4fd703bea31e5d6b1fc20b (patch)
tree165b53c9af2e9f08c52736f704d3c94fdaec8041 /include/uapi/linux/openvswitch.h
parentnet: export peernet2id_alloc (diff)
downloadkernel-qcow2-linux-9354d452034273a50a4fd703bea31e5d6b1fc20b.tar.gz
kernel-qcow2-linux-9354d452034273a50a4fd703bea31e5d6b1fc20b.tar.xz
kernel-qcow2-linux-9354d452034273a50a4fd703bea31e5d6b1fc20b.zip
openvswitch: reliable interface indentification in port dumps
This patch allows reliable identification of netdevice interfaces connected to openvswitch bridges. In particular, user space queries the netdev interfaces belonging to the ports for statistics, up/down state, etc. Datapath dump needs to provide enough information for the user space to be able to do that. Currently, only interface names are returned. This is not sufficient, as openvswitch allows its ports to be in different name spaces and the interface name is valid only in its name space. What is needed and generally used in other netlink APIs, is the pair ifindex+netnsid. The solution is addition of the ifindex+netnsid pair (or only ifindex if in the same name space) to vport get/dump operation. On request side, ideally the ifindex+netnsid pair could be used to get/set/del the corresponding vport. This is not implemented by this patch and can be added later if needed. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/openvswitch.h')
-rw-r--r--include/uapi/linux/openvswitch.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index ffe397daad49..501e4c4e2a03 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -258,6 +258,8 @@ enum ovs_vport_attr {
/* receiving upcalls */
OVS_VPORT_ATTR_STATS, /* struct ovs_vport_stats */
OVS_VPORT_ATTR_PAD,
+ OVS_VPORT_ATTR_IFINDEX,
+ OVS_VPORT_ATTR_NETNSID,
__OVS_VPORT_ATTR_MAX
};