aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow_netlink.h
diff options
context:
space:
mode:
authorJoe Stringer <joestringer@nicira.com>2015-01-21 19:42:52 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-26 18:45:50 -0500
commit74ed7ab9264c54471c7f057409d352052820d750 (patch)
treef90152a0560337fceaf55538a9e57e8c9aaa9182 /net/openvswitch/flow_netlink.h
parent7b1883cefc288b2725966357edd2d8f321605622 (diff)
openvswitch: Add support for unique flow IDs.
Previously, flows were manipulated by userspace specifying a full, unmasked flow key. This adds significant burden onto flow serialization/deserialization, particularly when dumping flows. This patch adds an alternative way to refer to flows using a variable-length "unique flow identifier" (UFID). At flow setup time, userspace may specify a UFID for a flow, which is stored with the flow and inserted into a separate table for lookup, in addition to the standard flow table. Flows created using a UFID must be fetched or deleted using the UFID. All flow dump operations may now be made more terse with OVS_UFID_F_* flags. For example, the OVS_UFID_F_OMIT_KEY flag allows responses to omit the flow key from a datapath operation if the flow has a corresponding UFID. This significantly reduces the time spent assembling and transacting netlink messages. With all OVS_UFID_F_OMIT_* flags enabled, the datapath only returns the UFID and statistics for each flow during flow dump, increasing ovs-vswitchd revalidator performance by 40% or more. Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/flow_netlink.h')
-rw-r--r--net/openvswitch/flow_netlink.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/openvswitch/flow_netlink.h b/net/openvswitch/flow_netlink.h
index 9ed09e66876a..5c3d75bff310 100644
--- a/net/openvswitch/flow_netlink.h
+++ b/net/openvswitch/flow_netlink.h
@@ -48,7 +48,8 @@ int ovs_nla_put_key(const struct sw_flow_key *, const struct sw_flow_key *,
48int ovs_nla_get_flow_metadata(const struct nlattr *, struct sw_flow_key *, 48int ovs_nla_get_flow_metadata(const struct nlattr *, struct sw_flow_key *,
49 bool log); 49 bool log);
50 50
51int ovs_nla_put_unmasked_key(const struct sw_flow *flow, struct sk_buff *skb); 51int ovs_nla_put_identifier(const struct sw_flow *flow, struct sk_buff *skb);
52int ovs_nla_put_masked_key(const struct sw_flow *flow, struct sk_buff *skb);
52int ovs_nla_put_mask(const struct sw_flow *flow, struct sk_buff *skb); 53int ovs_nla_put_mask(const struct sw_flow *flow, struct sk_buff *skb);
53 54
54int ovs_nla_get_match(struct sw_flow_match *, const struct nlattr *key, 55int ovs_nla_get_match(struct sw_flow_match *, const struct nlattr *key,
@@ -56,6 +57,11 @@ int ovs_nla_get_match(struct sw_flow_match *, const struct nlattr *key,
56int ovs_nla_put_egress_tunnel_key(struct sk_buff *, 57int ovs_nla_put_egress_tunnel_key(struct sk_buff *,
57 const struct ovs_tunnel_info *); 58 const struct ovs_tunnel_info *);
58 59
60bool ovs_nla_get_ufid(struct sw_flow_id *, const struct nlattr *, bool log);
61int ovs_nla_get_identifier(struct sw_flow_id *sfid, const struct nlattr *ufid,
62 const struct sw_flow_key *key, bool log);
63u32 ovs_nla_get_ufid_flags(const struct nlattr *attr);
64
59int ovs_nla_copy_actions(const struct nlattr *attr, 65int ovs_nla_copy_actions(const struct nlattr *attr,
60 const struct sw_flow_key *key, 66 const struct sw_flow_key *key,
61 struct sw_flow_actions **sfa, bool log); 67 struct sw_flow_actions **sfa, bool log);