[ofa-general] Re: [PATCHv3 2/2] ipoib: handle pkey change events

Michael S. Tsirkin mst at dev.mellanox.co.il
Wed May 9 10:41:38 PDT 2007


> @@ -642,6 +651,11 @@ void ipoib_ib_dev_flush(struct work_stru
>  
>  	ipoib_ib_dev_down(dev, 0);
>  
> +	if (restart_qp) {
> +		ipoib_ib_dev_stop(dev, 0);
> +		ipoib_ib_dev_open(dev);
> +	}
> +
>  	/*
>  	 * The device could have been brought down between the start and when
>  	 * we get here, don't bring it back up if it's not configured up

By the way, I think I see a small issue now - if there's a
pkey change event, this will flush all interfaces, even if
the pkey changed is not used by ipoib at all.

How about:
- rename restart_qp flag to pkey_change_event
- do something like this at the beginning of the flush routine
	if (pkey_change_event &&
		query_pkey(current index) == current_pkey))
		return;

Need to think what to do if index is not valid, but you get the idea.

This will remove all the extra flushes in the common case
where pkeys are not moved around too much.

-- 
MST



More information about the general mailing list