[ovs-dev] [PATCH v2 net-next] openvswitch: fix vport-netdev unregister

Cong Wang xiyou.wangcong at gmail.com
Sun Oct 13 21:22:11 UTC 2013


On Sat, 12 Oct 2013 at 01:12 GMT, Alexei Starovoitov <ast at plumgrid.com> wrote:
> @@ -87,7 +81,11 @@ static int dp_device_event(struct notifier_block *unused, unsigned long event,
>  	if (!vport)
>  		return NOTIFY_DONE;
>  
> -	if (event == NETDEV_UNREGISTER) {
> +	if (event == NETDEV_UNREGISTER && dev->priv_flags & IFF_OVS_DATAPATH) {
> +		/* upper_dev_unlink and decrement promisc immediately */
> +		ovs_netdev_detach_dev(vport);
> +
> +		/* schedule vport destroy, dev_put and genl notification */

ovs_netdev_get_vport() already checks IFF_OVS_DATAPATH flag before this 'if'.




More information about the dev mailing list