diff options
author | Jiri Benc <jbenc@redhat.com> | 2017-11-02 17:04:37 -0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-05 21:49:17 +0900 |
commit | 9354d452034273a50a4fd703bea31e5d6b1fc20b (patch) | |
tree | 165b53c9af2e9f08c52736f704d3c94fdaec8041 /net/openvswitch/datapath.h | |
parent | 7cbebc8a142238da3c2966f87b81ace491c8f089 (diff) | |
download | op-kernel-dev-9354d452034273a50a4fd703bea31e5d6b1fc20b.zip op-kernel-dev-9354d452034273a50a4fd703bea31e5d6b1fc20b.tar.gz |
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 'net/openvswitch/datapath.h')
-rw-r--r-- | net/openvswitch/datapath.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h index 4806006..4a104ef 100644 --- a/net/openvswitch/datapath.h +++ b/net/openvswitch/datapath.h @@ -200,8 +200,8 @@ int ovs_dp_upcall(struct datapath *, struct sk_buff *, uint32_t cutlen); const char *ovs_dp_name(const struct datapath *dp); -struct sk_buff *ovs_vport_cmd_build_info(struct vport *, u32 pid, u32 seq, - u8 cmd); +struct sk_buff *ovs_vport_cmd_build_info(struct vport *vport, struct net *net, + u32 portid, u32 seq, u8 cmd); int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, const struct sw_flow_actions *, struct sw_flow_key *); |