diff options
author | Joe Stringer <joestringer@nicira.com> | 2015-01-22 03:42:48 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-27 02:45:49 +0300 |
commit | 5b4237bbc93b1b54d35b037cfc0ece71cd8e358d (patch) | |
tree | a4a7e22a7f0c77b44f48fce7eef3903cf9e5fae1 /net/openvswitch/flow_netlink.h | |
parent | 707d79e5cdcf7833d31fea9712f11b185ce25822 (diff) | |
download | linux-5b4237bbc93b1b54d35b037cfc0ece71cd8e358d.tar.xz |
openvswitch: Refactor ovs_nla_fill_match().
Refactor the ovs_nla_fill_match() function into separate netlink
serialization functions ovs_nla_put_{unmasked_key,mask}(). Modify
ovs_nla_put_flow() to handle attribute nesting and expose the 'is_mask'
parameter - all callers need to nest the flow, and callers have better
knowledge about whether it is serializing a mask or not.
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.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/openvswitch/flow_netlink.h b/net/openvswitch/flow_netlink.h index 577f12be3459..9ed09e66876a 100644 --- a/net/openvswitch/flow_netlink.h +++ b/net/openvswitch/flow_netlink.h @@ -43,11 +43,14 @@ size_t ovs_key_attr_size(void); void ovs_match_init(struct sw_flow_match *match, struct sw_flow_key *key, struct sw_flow_mask *mask); -int ovs_nla_put_flow(const struct sw_flow_key *, - const struct sw_flow_key *, struct sk_buff *); +int ovs_nla_put_key(const struct sw_flow_key *, const struct sw_flow_key *, + int attr, bool is_mask, struct sk_buff *); int ovs_nla_get_flow_metadata(const struct nlattr *, struct sw_flow_key *, bool log); +int ovs_nla_put_unmasked_key(const struct sw_flow *flow, struct sk_buff *skb); +int ovs_nla_put_mask(const struct sw_flow *flow, struct sk_buff *skb); + int ovs_nla_get_match(struct sw_flow_match *, const struct nlattr *key, const struct nlattr *mask, bool log); int ovs_nla_put_egress_tunnel_key(struct sk_buff *, |