[ofa-general] Re: [PATCH 4/6 v2] fix pkey change handling and remove the cahce

Michael S. Tsirkin mst at dev.mellanox.co.il
Mon May 7 06:31:40 PDT 2007


> @@ -139,6 +139,9 @@ static void smp_snoop(struct ib_device *
>  			event.element.port_num = port_num;
>  			ib_dispatch_event(&event);
>  		}
> +
> +		/* update cache with the incoming mad */

Please don't add such comments: name mthca_cache_update is clear enough.

> +		mthca_cache_update(to_mdev(ibdev), port_num, mad);
>  	}
>  }

This will generate the event first, update cache after this, right?
If so, there is still a window where e.g. ipoib gets
a pkey change event, performs a query and gets a stale value.

-- 
MST



More information about the general mailing list