diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-05-19 12:24:16 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-20 00:33:18 -0400 |
commit | 449f4544267e73d5db372971da63634707c32299 (patch) | |
tree | acee6de13f34c179ec46ef7f8a49e66b229f4460 /include | |
parent | 034cfe48d0efc248ba4b725e3a94b95e76fbc5d3 (diff) |
macvlan: remove one synchronize_rcu() call
When one macvlan device is dismantled, we can avoid one
synchronize_rcu() call done after deletion from hash list, since caller
will perform a synchronize_net() call after its ndo_stop() call.
Add a new netdev->dismantle field to signal this dismantle intent.
Reduces RTNL hold time.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Patrick McHardy <kaber@trash.net>
CC: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a134d809125b..ca333e79e10f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1293,7 +1293,9 @@ struct net_device { NETREG_UNREGISTERED, /* completed unregister todo */ NETREG_RELEASED, /* called free_netdev */ NETREG_DUMMY, /* dummy device for NAPI poll */ - } reg_state:16; + } reg_state:8; + + bool dismantle; /* device is going do be freed */ enum { RTNL_LINK_INITIALIZED, |