lkml.org 
[lkml]   [2021]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 for-next 3/3] IB/core: Obtain subnet_prefix from cache in IB devices
On Fri, Jun 25, 2021 at 11:33:58AM +0530, Anand Khoje wrote:
>
> If the above change is to be made, there could arise a scenario in which:
> In case of a cache_update event, another application/module could try to
> call ib_query_port() and read subnet_prefix while the cache is still getting
> updated and the application/module could end up reading a stale value of
> subnet_prefix.

Applications relying on this data must hook the event and update their
state when the event fires.

So long as ib_query_port returns the correct value in the event
handler it is all OK. This whole thing is racy - the HW can change the
subnet_prefix at anytime, this is just shuffling the race around.

> - Is it possible that different GIDs in the gid_table will have different
> values of subnet_prefix?

Valid GIDs should have the same prefix

Jason

\
 
 \ /
  Last update: 2021-06-25 14:48    [W:0.566 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site