diff options
author | Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> | 2012-09-12 16:32:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-13 16:18:40 -0400 |
commit | d530d6df96ee28902486f8e11815ef9ad3a1cd1b (patch) | |
tree | 2c5419eee3a1c52d18dfb3784224842625fdba5d /net/core | |
parent | 5d07d8680692a208be0466a352c9fde7eec2afa7 (diff) |
netprio_cgroup: Remove update_netdev_tables() since it is unnecessary
The update_netdev_tables() function appears to be unnecessary, since the
write_update_netdev_table() function will adjust the priomaps as and when
required anyway. So drop the usage of update_netdev_tables() entirely.
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/netprio_cgroup.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index c75e3f9d060f..fd339bb00106 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c | |||
@@ -109,32 +109,6 @@ static int write_update_netdev_table(struct net_device *dev) | |||
109 | return ret; | 109 | return ret; |
110 | } | 110 | } |
111 | 111 | ||
112 | static int update_netdev_tables(void) | ||
113 | { | ||
114 | int ret = 0; | ||
115 | struct net_device *dev; | ||
116 | u32 max_len; | ||
117 | struct netprio_map *map; | ||
118 | |||
119 | rtnl_lock(); | ||
120 | max_len = atomic_read(&max_prioidx) + 1; | ||
121 | for_each_netdev(&init_net, dev) { | ||
122 | map = rtnl_dereference(dev->priomap); | ||
123 | /* | ||
124 | * don't allocate priomap if we didn't | ||
125 | * change net_prio.ifpriomap (map == NULL), | ||
126 | * this will speed up skb_update_prio. | ||
127 | */ | ||
128 | if (map && map->priomap_len < max_len) { | ||
129 | ret = extend_netdev_table(dev, max_len); | ||
130 | if (ret < 0) | ||
131 | break; | ||
132 | } | ||
133 | } | ||
134 | rtnl_unlock(); | ||
135 | return ret; | ||
136 | } | ||
137 | |||
138 | static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp) | 112 | static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp) |
139 | { | 113 | { |
140 | struct cgroup_netprio_state *cs; | 114 | struct cgroup_netprio_state *cs; |
@@ -153,12 +127,6 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp) | |||
153 | goto out; | 127 | goto out; |
154 | } | 128 | } |
155 | 129 | ||
156 | ret = update_netdev_tables(); | ||
157 | if (ret < 0) { | ||
158 | put_prioidx(cs->prioidx); | ||
159 | goto out; | ||
160 | } | ||
161 | |||
162 | return &cs->css; | 130 | return &cs->css; |
163 | out: | 131 | out: |
164 | kfree(cs); | 132 | kfree(cs); |