Re: [PATCH v6 for-next 0/2] IB/core: Obtaining subnet_prefix from cache in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 27, 2021 at 02:33:31PM +0300, Leon Romanovsky wrote:
> On Sun, Jun 27, 2021 at 10:40:43AM +0000, Haakon Bugge wrote:
> > 
> > 
> > > On 27 Jun 2021, at 12:31, Leon Romanovsky <leon@xxxxxxxxxx> wrote:
> > > 
> > > On Sun, Jun 27, 2021 at 12:17:51PM +0530, Anand Khoje wrote:
> > >> This v6 patch series is used to read the port_attribute subnet_prefix
> > >> from a valid cache entry instead of having to call
> > >> device->ops.query_gid() for Infiniband link-layer devices in
> > >> __ib_query_port().
> > >> 
> > >> In the event of a cache update, the value for subnet_prefix gets read
> > >> using device->ops.query_gid() in config_non_roce_gid_cache().
> > >> 
> > >> Anand Khoje (2):
> > >>  IB/core: Updating cache for subnet_prefix in
> > >>    config_non_roce_gid_cache()
> > >>  IB/core: Read subnet_prefix in ib_query_port via cache.
> > > 
> > > This series breaks mlx4/mlx5. You forgot to call to lock_init or
> > > something like that.
> > 
> > Thanks for catching!
> > 
> > Sure, in ib_register_device(), setup_device() (which ends up calling __ib_query_port()) is called before ib_cache_setup_one(). Can these two calls have their order swapped?
> 
> I don't think so, if I didn't miss anything, we are relying in gid_table_setup_one()
> on some properties from setup_device().

Just reorder things enough so that the cache_lock is setup earlier, it
has no business being in cache_setup_one anyhow.

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux