aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow.h
diff options
context:
space:
mode:
authorThomas Graf <tgraf@noironetworks.com>2014-11-06 09:58:52 -0500
committerPravin B Shelar <pshelar@nicira.com>2014-11-09 21:58:44 -0500
commit12eb18f7115884b0c1513dda31b0051121116b3a (patch)
tree9c6003bff7ab289540d55460d9c0a0e1105a3716 /net/openvswitch/flow.h
parente8eedb85bd238613332570ac6ae683fee94fbe36 (diff)
openvswitch: Constify various function arguments
Help produce better optimized code. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'net/openvswitch/flow.h')
-rw-r--r--net/openvswitch/flow.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h
index 543b358ee57f..9e0a787c8627 100644
--- a/net/openvswitch/flow.h
+++ b/net/openvswitch/flow.h
@@ -53,7 +53,7 @@ struct ovs_key_ipv4_tunnel {
53 53
54struct ovs_tunnel_info { 54struct ovs_tunnel_info {
55 struct ovs_key_ipv4_tunnel tunnel; 55 struct ovs_key_ipv4_tunnel tunnel;
56 struct geneve_opt *options; 56 const struct geneve_opt *options;
57 u8 options_len; 57 u8 options_len;
58}; 58};
59 59
@@ -73,7 +73,7 @@ static inline void __ovs_flow_tun_info_init(struct ovs_tunnel_info *tun_info,
73 __be16 tp_dst, 73 __be16 tp_dst,
74 __be64 tun_id, 74 __be64 tun_id,
75 __be16 tun_flags, 75 __be16 tun_flags,
76 struct geneve_opt *opts, 76 const struct geneve_opt *opts,
77 u8 opts_len) 77 u8 opts_len)
78{ 78{
79 tun_info->tunnel.tun_id = tun_id; 79 tun_info->tunnel.tun_id = tun_id;
@@ -105,7 +105,7 @@ static inline void ovs_flow_tun_info_init(struct ovs_tunnel_info *tun_info,
105 __be16 tp_dst, 105 __be16 tp_dst,
106 __be64 tun_id, 106 __be64 tun_id,
107 __be16 tun_flags, 107 __be16 tun_flags,
108 struct geneve_opt *opts, 108 const struct geneve_opt *opts,
109 u8 opts_len) 109 u8 opts_len)
110{ 110{
111 __ovs_flow_tun_info_init(tun_info, iph->saddr, iph->daddr, 111 __ovs_flow_tun_info_init(tun_info, iph->saddr, iph->daddr,
@@ -244,14 +244,15 @@ struct arp_eth_header {
244} __packed; 244} __packed;
245 245
246void ovs_flow_stats_update(struct sw_flow *, __be16 tcp_flags, 246void ovs_flow_stats_update(struct sw_flow *, __be16 tcp_flags,
247 struct sk_buff *); 247 const struct sk_buff *);
248void ovs_flow_stats_get(const struct sw_flow *, struct ovs_flow_stats *, 248void ovs_flow_stats_get(const struct sw_flow *, struct ovs_flow_stats *,
249 unsigned long *used, __be16 *tcp_flags); 249 unsigned long *used, __be16 *tcp_flags);
250void ovs_flow_stats_clear(struct sw_flow *); 250void ovs_flow_stats_clear(struct sw_flow *);
251u64 ovs_flow_used_time(unsigned long flow_jiffies); 251u64 ovs_flow_used_time(unsigned long flow_jiffies);
252 252
253int ovs_flow_key_update(struct sk_buff *skb, struct sw_flow_key *key); 253int ovs_flow_key_update(struct sk_buff *skb, struct sw_flow_key *key);
254int ovs_flow_key_extract(struct ovs_tunnel_info *tun_info, struct sk_buff *skb, 254int ovs_flow_key_extract(const struct ovs_tunnel_info *tun_info,
255 struct sk_buff *skb,
255 struct sw_flow_key *key); 256 struct sw_flow_key *key);
256/* Extract key from packet coming from userspace. */ 257/* Extract key from packet coming from userspace. */
257int ovs_flow_key_extract_userspace(const struct nlattr *attr, 258int ovs_flow_key_extract_userspace(const struct nlattr *attr,