Displaying 14 results from an estimated 14 matches for "dev_base_lock".
2007 Apr 18
1
[Bridge] [PATCH] bridge use read_lock when scanning device list
On 2.6.1, bridge is using rtnl_shlock which is equivalent to rtnl_lock when
all it really needs to do is read_lock(&dev_base_lock).
diff -Nru a/net/bridge/br_if.c b/net/bridge/br_if.c
--- a/net/bridge/br_if.c Mon Jan 12 13:45:44 2004
+++ b/net/bridge/br_if.c Mon Jan 12 13:45:44 2004
@@ -252,12 +252,12 @@
struct net_device *dev;
int i = 0;
- rtnl_shlock();
+ read_lock(&dev_base_lock);
for (dev = dev_base; dev &am...
2019 Mar 29
0
[PATCH net v4] failover: allow name change on IFF_UP slave interfaces
...AMSIZ);
1229 dev->name_assign_type = old_assign_type;
1230 write_seqcount_end(&devnet_rename_seq);
1231 return ret;
1232 }
1233
1234 write_seqcount_end(&devnet_rename_seq);
1235
1236 netdev_adjacent_rename_links(dev, oldname);
1237
1238 write_lock_bh(&dev_base_lock);
1239 hlist_del_rcu(&dev->name_hlist);
1240 write_unlock_bh(&dev_base_lock);
1241
1242 synchronize_rcu();
1243
1244 write_lock_bh(&dev_base_lock);
1245 hlist_add_head_rcu(&dev->name_hlist, dev_name_hash(net, dev->name));
1246 write_unlock_bh(&de...
2019 Mar 28
0
[PATCH net v3] failover: allow name change on IFF_UP slave interfaces
...assign_type;
1236 write_seqcount_end(&devnet_rename_seq);
1237 if (err >= 0)
1238 err = ret;
1239 goto reopen;
1240 }
1241
1242 write_seqcount_end(&devnet_rename_seq);
1243
1244 netdev_adjacent_rename_links(dev, oldname);
1245
1246 write_lock_bh(&dev_base_lock);
1247 hlist_del_rcu(&dev->name_hlist);
1248 write_unlock_bh(&dev_base_lock);
1249
1250 synchronize_rcu();
1251
1252 write_lock_bh(&dev_base_lock);
1253 hlist_add_head_rcu(&dev->name_hlist, dev_name_hash(net, dev->name));
1254 write_unlock_bh(&de...
2004 Nov 10
2
Reset Statistics?
2007 Apr 18
0
[Bridge] [PATCH] (4/11) bridge - ioctl cleanup and consolidation
...ru a/net/bridge/br_if.c b/net/bridge/br_if.c
--- a/net/bridge/br_if.c 2004-05-20 10:51:05 -07:00
+++ b/net/bridge/br_if.c 2004-05-20 10:51:05 -07:00
@@ -309,34 +309,6 @@
return 0;
}
-int br_get_bridge_ifindices(int *indices, int num)
-{
- struct net_device *dev;
- int i = 0;
-
- read_lock(&dev_base_lock);
- for (dev = dev_base; dev && i < num; dev = dev->next) {
- if (dev->priv_flags & IFF_EBRIDGE)
- indices[i++] = dev->ifindex;
- }
- read_unlock(&dev_base_lock);
-
- return i;
-}
-
-void br_get_port_ifindices(struct net_bridge *br, int *ifindices, int num)
-{
- stru...
2013 Oct 08
1
OT: errors compiling kernel module as a rpm package
...= 0xafbc0d15
kernel(autoremove_wake_function) = 0xc8b57c27 kernel(boot_tvec_bases)
= 0xfc6256b9 kernel(call_rcu) = 0x1251d30f kernel(complete) =
0xe456bd3a kernel(consume_skb) = 0x0de0cf25 kernel(cpu_possible_mask)
= 0x76a495c1 kernel(csum_partial) = 0xe113bbbc kernel(del_timer) =
0x6307fc98 kernel(dev_base_lock) = 0xd1f91bcd kernel(dev_get_by_name)
= 0x6edb8870 kernel(dev_queue_xmit) = 0x0d110dab
kernel(dev_set_promiscuity) = 0x599a4d52 kernel(dst_release) =
0xec3f0011 kernel(eth_type_trans) = 0xd55704ee kernel(ether_setup) =
0x7f8bdd3a kernel(ethtool_op_get_link) = 0xd4be820d
kernel(ethtool_op_get_sg) =...
2019 Apr 02
0
[PATCH net v5] failover: allow name change on IFF_UP slave interfaces
...E)))
> return -EBUSY;
>
> write_seqcount_begin(&devnet_rename_seq);
> @@ -1232,6 +1246,15 @@ int dev_change_name(struct net_device *dev, const char *newname)
> hlist_add_head_rcu(&dev->name_hlist, dev_name_hash(net, dev->name));
> write_unlock_bh(&dev_base_lock);
>
> + if (unlikely(dev->flags & IFF_UP)) {
> + struct netdev_notifier_change_info change_info = {
> + .info.dev = dev,
> + };
> +
> + call_netdevice_notifiers_info(NETDEV_CHANGE,
> + &change_info.info);
> + }
> +
> ret = call_netdev...
2019 Apr 02
0
[PATCH net v5] failover: allow name change on IFF_UP slave interfaces
..._SLAVE)))
> return -EBUSY;
>
> write_seqcount_begin(&devnet_rename_seq);
> @@ -1232,6 +1246,15 @@ int dev_change_name(struct net_device *dev, const char *newname)
> hlist_add_head_rcu(&dev->name_hlist, dev_name_hash(net, dev->name));
> write_unlock_bh(&dev_base_lock);
>
> + if (unlikely(dev->flags & IFF_UP)) {
> + struct netdev_notifier_change_info change_info = {
> + .info.dev = dev,
> + };
> +
> + call_netdevice_notifiers_info(NETDEV_CHANGE,
> + &change_info.info);
> + }
> +
> ret = call_netdevic...
2019 Mar 29
0
[PATCH net v4] failover: allow name change on IFF_UP slave interfaces
...E)))
> return -EBUSY;
>
> write_seqcount_begin(&devnet_rename_seq);
> @@ -1227,6 +1241,14 @@ int dev_change_name(struct net_device *dev, const char *newname)
> hlist_add_head_rcu(&dev->name_hlist, dev_name_hash(net, dev->name));
> write_unlock_bh(&dev_base_lock);
>
> + if (unlikely(dev->flags & IFF_UP)) {
> + struct netdev_notifier_change_info change_info;
> +
> + change_info.flags_changed = 0;
> + call_netdevice_notifiers_info(NETDEV_CHANGE, dev,
> + &change_info.info);
This function no longer takes the de...
2019 Mar 29
0
[PATCH net v4] failover: allow name change on IFF_UP slave interfaces
...&devnet_rename_seq);
> > > @@ -1227,6 +1241,14 @@ int dev_change_name(struct net_device *dev,
> > > const char *newname)
> > > hlist_add_head_rcu(&dev->name_hlist, dev_name_hash(net,
> > > dev->name));
> > > write_unlock_bh(&dev_base_lock);
> > > + if (unlikely(dev->flags & IFF_UP)) {
> > > + struct netdev_notifier_change_info change_info;
> > > +
> > > + change_info.flags_changed = 0;
> > > + call_netdevice_notifiers_info(NETDEV_CHANGE, dev,
> > >...
2019 Apr 05
2
[PATCH net v6] failover: allow name change on IFF_UP slave interfaces
...CHANGE)))
> return -EBUSY;
>
> write_seqcount_begin(&devnet_rename_seq);
> @@ -1232,6 +1246,15 @@ int dev_change_name(struct net_device *dev, const char *newname)
> hlist_add_head_rcu(&dev->name_hlist, dev_name_hash(net, dev->name));
> write_unlock_bh(&dev_base_lock);
>
> + if (unlikely(dev->flags & IFF_UP)) {
> + struct netdev_notifier_change_info change_info = {
> + .info.dev = dev,
> + };
> +
> + call_netdevice_notifiers_info(NETDEV_CHANGE,
> + &change_info.info);
> + }
> +
> ret = call_netdevic...
2019 Apr 05
2
[PATCH net v6] failover: allow name change on IFF_UP slave interfaces
...CHANGE)))
> return -EBUSY;
>
> write_seqcount_begin(&devnet_rename_seq);
> @@ -1232,6 +1246,15 @@ int dev_change_name(struct net_device *dev, const char *newname)
> hlist_add_head_rcu(&dev->name_hlist, dev_name_hash(net, dev->name));
> write_unlock_bh(&dev_base_lock);
>
> + if (unlikely(dev->flags & IFF_UP)) {
> + struct netdev_notifier_change_info change_info = {
> + .info.dev = dev,
> + };
> +
> + call_netdevice_notifiers_info(NETDEV_CHANGE,
> + &change_info.info);
> + }
> +
> ret = call_netdevic...
2017 Jan 05
3
[PATCH net-next] net: make ndo_get_stats64 a void function
.../cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index cdd7a1a59aa7..c5842c525eed 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -680,8 +680,8 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
}
/* dev_base_lock rwlock held, nominally process context */
-static struct rtnl_link_stats64 *enic_get_stats(struct net_device *netdev,
- struct rtnl_link_stats64 *net_stats)
+static void enic_get_stats(struct net_device *netdev,
+ struct rtnl_link_stats64 *net_stats)
{
struct enic *enic = netdev_priv(n...
2017 Jan 05
3
[PATCH net-next] net: make ndo_get_stats64 a void function
.../cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index cdd7a1a59aa7..c5842c525eed 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -680,8 +680,8 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
}
/* dev_base_lock rwlock held, nominally process context */
-static struct rtnl_link_stats64 *enic_get_stats(struct net_device *netdev,
- struct rtnl_link_stats64 *net_stats)
+static void enic_get_stats(struct net_device *netdev,
+ struct rtnl_link_stats64 *net_stats)
{
struct enic *enic = netdev_priv(n...