[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210628170258.GD4604@ziepe.ca>
Date: Mon, 28 Jun 2021 14:02:58 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Leon Romanovsky <leon@...nel.org>
Cc: Haakon Bugge <haakon.bugge@...cle.com>,
Anand Khoje <anand.a.khoje@...cle.com>,
OFED mailing list <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dledford@...hat.com" <dledford@...hat.com>
Subject: Re: [PATCH v6 for-next 0/2] IB/core: Obtaining subnet_prefix from
cache in
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@...nel.org> 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
Powered by blists - more mailing lists