aboutsummaryrefslogtreecommitdiffstats
path: root/net
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
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')
-rw-r--r--net/openvswitch/actions.c7
-rw-r--r--net/openvswitch/datapath.c10
-rw-r--r--net/openvswitch/datapath.h4
-rw-r--r--net/openvswitch/flow.c4
-rw-r--r--net/openvswitch/flow.h11
-rw-r--r--net/openvswitch/flow_table.c12
-rw-r--r--net/openvswitch/flow_table.h8
-rw-r--r--net/openvswitch/vport-geneve.c2
-rw-r--r--net/openvswitch/vport-netdev.c2
-rw-r--r--net/openvswitch/vport.c8
-rw-r--r--net/openvswitch/vport.h6
11 files changed, 38 insertions, 36 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 10c94ac969f4..394efa67934e 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -69,7 +69,7 @@ static void action_fifo_init(struct action_fifo *fifo)
69 fifo->tail = 0; 69 fifo->tail = 0;
70} 70}
71 71
72static bool action_fifo_is_empty(struct action_fifo *fifo) 72static bool action_fifo_is_empty(const struct action_fifo *fifo)
73{ 73{
74 return (fifo->head == fifo->tail); 74 return (fifo->head == fifo->tail);
75} 75}
@@ -92,7 +92,7 @@ static struct deferred_action *action_fifo_put(struct action_fifo *fifo)
92 92
93/* Return true if fifo is not full */ 93/* Return true if fifo is not full */
94static struct deferred_action *add_deferred_actions(struct sk_buff *skb, 94static struct deferred_action *add_deferred_actions(struct sk_buff *skb,
95 struct sw_flow_key *key, 95 const struct sw_flow_key *key,
96 const struct nlattr *attr) 96 const struct nlattr *attr)
97{ 97{
98 struct action_fifo *fifo; 98 struct action_fifo *fifo;
@@ -944,7 +944,8 @@ static void process_deferred_actions(struct datapath *dp)
944 944
945/* Execute a list of actions against 'skb'. */ 945/* Execute a list of actions against 'skb'. */
946int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, 946int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb,
947 struct sw_flow_actions *acts, struct sw_flow_key *key) 947 const struct sw_flow_actions *acts,
948 struct sw_flow_key *key)
948{ 949{
949 int level = this_cpu_read(exec_actions_level); 950 int level = this_cpu_read(exec_actions_level);
950 int err; 951 int err;
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 7146b38a954e..65561ebb489e 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -178,7 +178,7 @@ const char *ovs_dp_name(const struct datapath *dp)
178 return vport->ops->get_name(vport); 178 return vport->ops->get_name(vport);
179} 179}
180 180
181static int get_dpifindex(struct datapath *dp) 181static int get_dpifindex(const struct datapath *dp)
182{ 182{
183 struct vport *local; 183 struct vport *local;
184 int ifindex; 184 int ifindex;
@@ -633,7 +633,7 @@ static struct genl_family dp_packet_genl_family = {
633 .n_ops = ARRAY_SIZE(dp_packet_genl_ops), 633 .n_ops = ARRAY_SIZE(dp_packet_genl_ops),
634}; 634};
635 635
636static void get_dp_stats(struct datapath *dp, struct ovs_dp_stats *stats, 636static void get_dp_stats(const struct datapath *dp, struct ovs_dp_stats *stats,
637 struct ovs_dp_megaflow_stats *mega_stats) 637 struct ovs_dp_megaflow_stats *mega_stats)
638{ 638{
639 int i; 639 int i;
@@ -1352,7 +1352,7 @@ static struct sk_buff *ovs_dp_cmd_alloc_info(struct genl_info *info)
1352 1352
1353/* Called with rcu_read_lock or ovs_mutex. */ 1353/* Called with rcu_read_lock or ovs_mutex. */
1354static struct datapath *lookup_datapath(struct net *net, 1354static struct datapath *lookup_datapath(struct net *net,
1355 struct ovs_header *ovs_header, 1355 const struct ovs_header *ovs_header,
1356 struct nlattr *a[OVS_DP_ATTR_MAX + 1]) 1356 struct nlattr *a[OVS_DP_ATTR_MAX + 1])
1357{ 1357{
1358 struct datapath *dp; 1358 struct datapath *dp;
@@ -1380,7 +1380,7 @@ static void ovs_dp_reset_user_features(struct sk_buff *skb, struct genl_info *in
1380 dp->user_features = 0; 1380 dp->user_features = 0;
1381} 1381}
1382 1382
1383static void ovs_dp_change(struct datapath *dp, struct nlattr **a) 1383static void ovs_dp_change(struct datapath *dp, struct nlattr *a[])
1384{ 1384{
1385 if (a[OVS_DP_ATTR_USER_FEATURES]) 1385 if (a[OVS_DP_ATTR_USER_FEATURES])
1386 dp->user_features = nla_get_u32(a[OVS_DP_ATTR_USER_FEATURES]); 1386 dp->user_features = nla_get_u32(a[OVS_DP_ATTR_USER_FEATURES]);
@@ -1744,7 +1744,7 @@ struct sk_buff *ovs_vport_cmd_build_info(struct vport *vport, u32 portid,
1744 1744
1745/* Called with ovs_mutex or RCU read lock. */ 1745/* Called with ovs_mutex or RCU read lock. */
1746static struct vport *lookup_vport(struct net *net, 1746static struct vport *lookup_vport(struct net *net,
1747 struct ovs_header *ovs_header, 1747 const struct ovs_header *ovs_header,
1748 struct nlattr *a[OVS_VPORT_ATTR_MAX + 1]) 1748 struct nlattr *a[OVS_VPORT_ATTR_MAX + 1])
1749{ 1749{
1750 struct datapath *dp; 1750 struct datapath *dp;
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 8de9f7e20ae9..8389c1d68e57 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -149,7 +149,7 @@ int lockdep_ovsl_is_held(void);
149#define rcu_dereference_ovsl(p) \ 149#define rcu_dereference_ovsl(p) \
150 rcu_dereference_check(p, lockdep_ovsl_is_held()) 150 rcu_dereference_check(p, lockdep_ovsl_is_held())
151 151
152static inline struct net *ovs_dp_get_net(struct datapath *dp) 152static inline struct net *ovs_dp_get_net(const struct datapath *dp)
153{ 153{
154 return read_pnet(&dp->net); 154 return read_pnet(&dp->net);
155} 155}
@@ -192,7 +192,7 @@ struct sk_buff *ovs_vport_cmd_build_info(struct vport *, u32 pid, u32 seq,
192 u8 cmd); 192 u8 cmd);
193 193
194int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, 194int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb,
195 struct sw_flow_actions *acts, struct sw_flow_key *); 195 const struct sw_flow_actions *, struct sw_flow_key *);
196 196
197void ovs_dp_notify_wq(struct work_struct *work); 197void ovs_dp_notify_wq(struct work_struct *work);
198 198
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index 90a21010fc8f..25e9abcd51f1 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -66,7 +66,7 @@ u64 ovs_flow_used_time(unsigned long flow_jiffies)
66#define TCP_FLAGS_BE16(tp) (*(__be16 *)&tcp_flag_word(tp) & htons(0x0FFF)) 66#define TCP_FLAGS_BE16(tp) (*(__be16 *)&tcp_flag_word(tp) & htons(0x0FFF))
67 67
68void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags, 68void ovs_flow_stats_update(struct sw_flow *flow, __be16 tcp_flags,
69 struct sk_buff *skb) 69 const struct sk_buff *skb)
70{ 70{
71 struct flow_stats *stats; 71 struct flow_stats *stats;
72 int node = numa_node_id(); 72 int node = numa_node_id();
@@ -679,7 +679,7 @@ int ovs_flow_key_update(struct sk_buff *skb, struct sw_flow_key *key)
679 return key_extract(skb, key); 679 return key_extract(skb, key);
680} 680}
681 681
682int ovs_flow_key_extract(struct ovs_tunnel_info *tun_info, 682int ovs_flow_key_extract(const struct ovs_tunnel_info *tun_info,
683 struct sk_buff *skb, struct sw_flow_key *key) 683 struct sk_buff *skb, struct sw_flow_key *key)
684{ 684{
685 /* Extract metadata from packet. */ 685 /* Extract metadata from packet. */
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,
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index 90f8b40a350b..e0a7fefc1edf 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -107,7 +107,7 @@ err:
107 return ERR_PTR(-ENOMEM); 107 return ERR_PTR(-ENOMEM);
108} 108}
109 109
110int ovs_flow_tbl_count(struct flow_table *table) 110int ovs_flow_tbl_count(const struct flow_table *table)
111{ 111{
112 return table->count; 112 return table->count;
113} 113}
@@ -401,7 +401,7 @@ static bool flow_cmp_masked_key(const struct sw_flow *flow,
401} 401}
402 402
403bool ovs_flow_cmp_unmasked_key(const struct sw_flow *flow, 403bool ovs_flow_cmp_unmasked_key(const struct sw_flow *flow,
404 struct sw_flow_match *match) 404 const struct sw_flow_match *match)
405{ 405{
406 struct sw_flow_key *key = match->key; 406 struct sw_flow_key *key = match->key;
407 int key_start = flow_key_start(key); 407 int key_start = flow_key_start(key);
@@ -412,7 +412,7 @@ bool ovs_flow_cmp_unmasked_key(const struct sw_flow *flow,
412 412
413static struct sw_flow *masked_flow_lookup(struct table_instance *ti, 413static struct sw_flow *masked_flow_lookup(struct table_instance *ti,
414 const struct sw_flow_key *unmasked, 414 const struct sw_flow_key *unmasked,
415 struct sw_flow_mask *mask) 415 const struct sw_flow_mask *mask)
416{ 416{
417 struct sw_flow *flow; 417 struct sw_flow *flow;
418 struct hlist_head *head; 418 struct hlist_head *head;
@@ -460,7 +460,7 @@ struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *tbl,
460} 460}
461 461
462struct sw_flow *ovs_flow_tbl_lookup_exact(struct flow_table *tbl, 462struct sw_flow *ovs_flow_tbl_lookup_exact(struct flow_table *tbl,
463 struct sw_flow_match *match) 463 const struct sw_flow_match *match)
464{ 464{
465 struct table_instance *ti = rcu_dereference_ovsl(tbl->ti); 465 struct table_instance *ti = rcu_dereference_ovsl(tbl->ti);
466 struct sw_flow_mask *mask; 466 struct sw_flow_mask *mask;
@@ -563,7 +563,7 @@ static struct sw_flow_mask *flow_mask_find(const struct flow_table *tbl,
563 563
564/* Add 'mask' into the mask list, if it is not already there. */ 564/* Add 'mask' into the mask list, if it is not already there. */
565static int flow_mask_insert(struct flow_table *tbl, struct sw_flow *flow, 565static int flow_mask_insert(struct flow_table *tbl, struct sw_flow *flow,
566 struct sw_flow_mask *new) 566 const struct sw_flow_mask *new)
567{ 567{
568 struct sw_flow_mask *mask; 568 struct sw_flow_mask *mask;
569 mask = flow_mask_find(tbl, new); 569 mask = flow_mask_find(tbl, new);
@@ -586,7 +586,7 @@ static int flow_mask_insert(struct flow_table *tbl, struct sw_flow *flow,
586 586
587/* Must be called with OVS mutex held. */ 587/* Must be called with OVS mutex held. */
588int ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow, 588int ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow,
589 struct sw_flow_mask *mask) 589 const struct sw_flow_mask *mask)
590{ 590{
591 struct table_instance *new_ti = NULL; 591 struct table_instance *new_ti = NULL;
592 struct table_instance *ti; 592 struct table_instance *ti;
diff --git a/net/openvswitch/flow_table.h b/net/openvswitch/flow_table.h
index f682c8c07f44..309fa6415689 100644
--- a/net/openvswitch/flow_table.h
+++ b/net/openvswitch/flow_table.h
@@ -61,12 +61,12 @@ struct sw_flow *ovs_flow_alloc(void);
61void ovs_flow_free(struct sw_flow *, bool deferred); 61void ovs_flow_free(struct sw_flow *, bool deferred);
62 62
63int ovs_flow_tbl_init(struct flow_table *); 63int ovs_flow_tbl_init(struct flow_table *);
64int ovs_flow_tbl_count(struct flow_table *table); 64int ovs_flow_tbl_count(const struct flow_table *table);
65void ovs_flow_tbl_destroy(struct flow_table *table); 65void ovs_flow_tbl_destroy(struct flow_table *table);
66int ovs_flow_tbl_flush(struct flow_table *flow_table); 66int ovs_flow_tbl_flush(struct flow_table *flow_table);
67 67
68int ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow, 68int ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow,
69 struct sw_flow_mask *mask); 69 const struct sw_flow_mask *mask);
70void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow); 70void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow);
71int ovs_flow_tbl_num_masks(const struct flow_table *table); 71int ovs_flow_tbl_num_masks(const struct flow_table *table);
72struct sw_flow *ovs_flow_tbl_dump_next(struct table_instance *table, 72struct sw_flow *ovs_flow_tbl_dump_next(struct table_instance *table,
@@ -77,9 +77,9 @@ struct sw_flow *ovs_flow_tbl_lookup_stats(struct flow_table *,
77struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *, 77struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *,
78 const struct sw_flow_key *); 78 const struct sw_flow_key *);
79struct sw_flow *ovs_flow_tbl_lookup_exact(struct flow_table *tbl, 79struct sw_flow *ovs_flow_tbl_lookup_exact(struct flow_table *tbl,
80 struct sw_flow_match *match); 80 const struct sw_flow_match *match);
81bool ovs_flow_cmp_unmasked_key(const struct sw_flow *flow, 81bool ovs_flow_cmp_unmasked_key(const struct sw_flow *flow,
82 struct sw_flow_match *match); 82 const struct sw_flow_match *match);
83 83
84void ovs_flow_mask_key(struct sw_flow_key *dst, const struct sw_flow_key *src, 84void ovs_flow_mask_key(struct sw_flow_key *dst, const struct sw_flow_key *src,
85 const struct sw_flow_mask *mask); 85 const struct sw_flow_mask *mask);
diff --git a/net/openvswitch/vport-geneve.c b/net/openvswitch/vport-geneve.c
index e31f19c922e2..347fa2325b22 100644
--- a/net/openvswitch/vport-geneve.c
+++ b/net/openvswitch/vport-geneve.c
@@ -68,7 +68,7 @@ static void tunnel_id_to_vni(__be64 tun_id, __u8 *vni)
68} 68}
69 69
70/* Convert 24 bit VNI to 64 bit tunnel ID. */ 70/* Convert 24 bit VNI to 64 bit tunnel ID. */
71static __be64 vni_to_tunnel_id(__u8 *vni) 71static __be64 vni_to_tunnel_id(const __u8 *vni)
72{ 72{
73#ifdef __BIG_ENDIAN 73#ifdef __BIG_ENDIAN
74 return (vni[0] << 16) | (vni[1] << 8) | vni[2]; 74 return (vni[0] << 16) | (vni[1] << 8) | vni[2];
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c
index 877ee74b4f08..4776282c6417 100644
--- a/net/openvswitch/vport-netdev.c
+++ b/net/openvswitch/vport-netdev.c
@@ -77,7 +77,7 @@ static rx_handler_result_t netdev_frame_hook(struct sk_buff **pskb)
77 return RX_HANDLER_CONSUMED; 77 return RX_HANDLER_CONSUMED;
78} 78}
79 79
80static struct net_device *get_dpdev(struct datapath *dp) 80static struct net_device *get_dpdev(const struct datapath *dp)
81{ 81{
82 struct vport *local; 82 struct vport *local;
83 83
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 630e81984b65..e771a46933e5 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -68,7 +68,7 @@ void ovs_vport_exit(void)
68 kfree(dev_table); 68 kfree(dev_table);
69} 69}
70 70
71static struct hlist_head *hash_bucket(struct net *net, const char *name) 71static struct hlist_head *hash_bucket(const struct net *net, const char *name)
72{ 72{
73 unsigned int hash = jhash(name, strlen(name), (unsigned long) net); 73 unsigned int hash = jhash(name, strlen(name), (unsigned long) net);
74 return &dev_table[hash & (VPORT_HASH_BUCKETS - 1)]; 74 return &dev_table[hash & (VPORT_HASH_BUCKETS - 1)];
@@ -107,7 +107,7 @@ EXPORT_SYMBOL_GPL(ovs_vport_ops_unregister);
107 * 107 *
108 * Must be called with ovs or RCU read lock. 108 * Must be called with ovs or RCU read lock.
109 */ 109 */
110struct vport *ovs_vport_locate(struct net *net, const char *name) 110struct vport *ovs_vport_locate(const struct net *net, const char *name)
111{ 111{
112 struct hlist_head *bucket = hash_bucket(net, name); 112 struct hlist_head *bucket = hash_bucket(net, name);
113 struct vport *vport; 113 struct vport *vport;
@@ -380,7 +380,7 @@ int ovs_vport_get_options(const struct vport *vport, struct sk_buff *skb)
380 * 380 *
381 * Must be called with ovs_mutex. 381 * Must be called with ovs_mutex.
382 */ 382 */
383int ovs_vport_set_upcall_portids(struct vport *vport, struct nlattr *ids) 383int ovs_vport_set_upcall_portids(struct vport *vport, const struct nlattr *ids)
384{ 384{
385 struct vport_portids *old, *vport_portids; 385 struct vport_portids *old, *vport_portids;
386 386
@@ -471,7 +471,7 @@ u32 ovs_vport_find_upcall_portid(const struct vport *vport, struct sk_buff *skb)
471 * skb->data should point to the Ethernet header. 471 * skb->data should point to the Ethernet header.
472 */ 472 */
473void ovs_vport_receive(struct vport *vport, struct sk_buff *skb, 473void ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
474 struct ovs_tunnel_info *tun_info) 474 const struct ovs_tunnel_info *tun_info)
475{ 475{
476 struct pcpu_sw_netstats *stats; 476 struct pcpu_sw_netstats *stats;
477 struct sw_flow_key key; 477 struct sw_flow_key key;
diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h
index 0635d1d761e9..99c8e71d9e6c 100644
--- a/net/openvswitch/vport.h
+++ b/net/openvswitch/vport.h
@@ -45,14 +45,14 @@ void ovs_vport_exit(void);
45struct vport *ovs_vport_add(const struct vport_parms *); 45struct vport *ovs_vport_add(const struct vport_parms *);
46void ovs_vport_del(struct vport *); 46void ovs_vport_del(struct vport *);
47 47
48struct vport *ovs_vport_locate(struct net *net, const char *name); 48struct vport *ovs_vport_locate(const struct net *net, const char *name);
49 49
50void ovs_vport_get_stats(struct vport *, struct ovs_vport_stats *); 50void ovs_vport_get_stats(struct vport *, struct ovs_vport_stats *);
51 51
52int ovs_vport_set_options(struct vport *, struct nlattr *options); 52int ovs_vport_set_options(struct vport *, struct nlattr *options);
53int ovs_vport_get_options(const struct vport *, struct sk_buff *); 53int ovs_vport_get_options(const struct vport *, struct sk_buff *);
54 54
55int ovs_vport_set_upcall_portids(struct vport *, struct nlattr *pids); 55int ovs_vport_set_upcall_portids(struct vport *, const struct nlattr *pids);
56int ovs_vport_get_upcall_portids(const struct vport *, struct sk_buff *); 56int ovs_vport_get_upcall_portids(const struct vport *, struct sk_buff *);
57u32 ovs_vport_find_upcall_portid(const struct vport *, struct sk_buff *); 57u32 ovs_vport_find_upcall_portid(const struct vport *, struct sk_buff *);
58 58
@@ -224,7 +224,7 @@ static inline struct vport *vport_from_priv(void *priv)
224} 224}
225 225
226void ovs_vport_receive(struct vport *, struct sk_buff *, 226void ovs_vport_receive(struct vport *, struct sk_buff *,
227 struct ovs_tunnel_info *); 227 const struct ovs_tunnel_info *);
228 228
229static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb, 229static inline void ovs_skb_postpush_rcsum(struct sk_buff *skb,
230 const void *start, unsigned int len) 230 const void *start, unsigned int len)