diff options
author | Jesse Gross <jesse@nicira.com> | 2012-11-29 02:01:52 +0400 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2012-11-29 02:04:34 +0400 |
commit | 92eb1d477145b2e7780b5002e856f70b8c3d74da (patch) | |
tree | dd9856ff7feb1dd9b10485c31c26fe4fa4d344c4 /net/openvswitch/vport-netdev.h | |
parent | 39c7caebc94e851f58b84b54659156dd30522e8e (diff) | |
download | linux-92eb1d477145b2e7780b5002e856f70b8c3d74da.tar.xz |
openvswitch: Use RCU callback when detaching netdevices.
Currently, each time a device is detached from an OVS datapath
we call synchronize RCU before freeing associated data structures.
However, if a bridge is deleted (which detaches all ports) when
many devices are connected then there can be a long delay. This
switches to use call_rcu() to group the cost together.
Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/vport-netdev.h')
-rw-r--r-- | net/openvswitch/vport-netdev.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/openvswitch/vport-netdev.h b/net/openvswitch/vport-netdev.h index f7072a25c604..6478079b3417 100644 --- a/net/openvswitch/vport-netdev.h +++ b/net/openvswitch/vport-netdev.h @@ -20,12 +20,15 @@ #define VPORT_NETDEV_H 1 #include <linux/netdevice.h> +#include <linux/rcupdate.h> #include "vport.h" struct vport *ovs_netdev_get_vport(struct net_device *dev); struct netdev_vport { + struct rcu_head rcu; + struct net_device *dev; }; |