aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.c
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/datapath.c
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/datapath.c')
-rw-r--r--net/openvswitch/datapath.c10
1 files changed, 5 insertions, 5 deletions
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;