Blame view

net/openvswitch/flow_netlink.h 2.43 KB
c94229992   Thomas Gleixner   treewide: Replace...
1
  /* SPDX-License-Identifier: GPL-2.0-only */
e64457191   Pravin B Shelar   openvswitch: Rest...
2
3
  /*
   * Copyright (c) 2007-2013 Nicira, Inc.
e64457191   Pravin B Shelar   openvswitch: Rest...
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
   */
  
  
  #ifndef FLOW_NETLINK_H
  #define FLOW_NETLINK_H 1
  
  #include <linux/kernel.h>
  #include <linux/netlink.h>
  #include <linux/openvswitch.h>
  #include <linux/spinlock.h>
  #include <linux/types.h>
  #include <linux/rcupdate.h>
  #include <linux/if_ether.h>
  #include <linux/in6.h>
  #include <linux/jiffies.h>
  #include <linux/time.h>
e64457191   Pravin B Shelar   openvswitch: Rest...
20
21
22
23
24
  
  #include <net/inet_ecn.h>
  #include <net/ip_tunnels.h>
  
  #include "flow.h"
8f0aad6f3   Wenyu Zhang   openvswitch: Exte...
25
  size_t ovs_tun_key_attr_size(void);
41af73e9c   Joe Stringer   openvswitch: Move...
26
  size_t ovs_key_attr_size(void);
e64457191   Pravin B Shelar   openvswitch: Rest...
27
  void ovs_match_init(struct sw_flow_match *match,
2279994d0   pravin shelar   openvswitch: avoi...
28
29
  		    struct sw_flow_key *key, bool reset_key,
  		    struct sw_flow_mask *mask);
e64457191   Pravin B Shelar   openvswitch: Rest...
30

5b4237bbc   Joe Stringer   openvswitch: Refa...
31
32
  int ovs_nla_put_key(const struct sw_flow_key *, const struct sw_flow_key *,
  		    int attr, bool is_mask, struct sk_buff *);
9dd7f8907   Jarno Rajahalme   openvswitch: Add ...
33
34
35
36
37
  int parse_flow_nlattrs(const struct nlattr *attr, const struct nlattr *a[],
  		       u64 *attrsp, bool log);
  int ovs_nla_get_flow_metadata(struct net *net,
  			      const struct nlattr *a[OVS_KEY_ATTR_MAX + 1],
  			      u64 attrs, struct sw_flow_key *key, bool log);
83c8df26a   Pravin B Shelar   openvswitch: refa...
38

74ed7ab92   Joe Stringer   openvswitch: Add ...
39
40
  int ovs_nla_put_identifier(const struct sw_flow *flow, struct sk_buff *skb);
  int ovs_nla_put_masked_key(const struct sw_flow *flow, struct sk_buff *skb);
5b4237bbc   Joe Stringer   openvswitch: Refa...
41
  int ovs_nla_put_mask(const struct sw_flow *flow, struct sk_buff *skb);
c2ac66735   Joe Stringer   openvswitch: Allo...
42
43
44
  int ovs_nla_get_match(struct net *, struct sw_flow_match *,
  		      const struct nlattr *key, const struct nlattr *mask,
  		      bool log);
fc4099f17   Pravin B Shelar   openvswitch: Fix ...
45
46
47
  
  int ovs_nla_put_tunnel_info(struct sk_buff *skb,
  			    struct ip_tunnel_info *tun_info);
e64457191   Pravin B Shelar   openvswitch: Rest...
48

74ed7ab92   Joe Stringer   openvswitch: Add ...
49
50
51
52
  bool ovs_nla_get_ufid(struct sw_flow_id *, const struct nlattr *, bool log);
  int ovs_nla_get_identifier(struct sw_flow_id *sfid, const struct nlattr *ufid,
  			   const struct sw_flow_key *key, bool log);
  u32 ovs_nla_get_ufid_flags(const struct nlattr *attr);
7f8a436ea   Joe Stringer   openvswitch: Add ...
53
  int ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
25cd9ba0a   Simon Horman   openvswitch: Add ...
54
  			 const struct sw_flow_key *key,
05da5898a   Jarno Rajahalme   openvswitch: Add ...
55
  			 struct sw_flow_actions **sfa, bool log);
7f8a436ea   Joe Stringer   openvswitch: Add ...
56
57
  int ovs_nla_add_action(struct sw_flow_actions **sfa, int attrtype,
  		       void *data, int len, bool log);
e64457191   Pravin B Shelar   openvswitch: Rest...
58
59
  int ovs_nla_put_actions(const struct nlattr *attr,
  			int len, struct sk_buff *skb);
e64457191   Pravin B Shelar   openvswitch: Rest...
60
  void ovs_nla_free_flow_actions(struct sw_flow_actions *);
34ae932a4   Thomas Graf   openvswitch: Make...
61
  void ovs_nla_free_flow_actions_rcu(struct sw_flow_actions *);
e64457191   Pravin B Shelar   openvswitch: Rest...
62

b2d0f5d5d   Yi Yang   openvswitch: enab...
63
64
65
66
  int nsh_key_from_nlattr(const struct nlattr *attr, struct ovs_key_nsh *nsh,
  			struct ovs_key_nsh *nsh_mask);
  int nsh_hdr_from_nlattr(const struct nlattr *attr, struct nshhdr *nh,
  			size_t size);
e64457191   Pravin B Shelar   openvswitch: Rest...
67
  #endif /* flow_netlink.h */