[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMcEbBrDyDgmYEPu@unreal>
Date: Mon, 14 Jun 2021 10:25:32 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Haakon Bugge <haakon.bugge@...cle.com>
Cc: 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>,
"jgg@...pe.ca" <jgg@...pe.ca>
Subject: Re: [PATCH v3 3/3] IB/core: Obtain subnet_prefix from cache in IB
devices.
On Mon, Jun 14, 2021 at 03:32:39AM +0000, Haakon Bugge wrote:
>
>
> > On 9 Jun 2021, at 12:40, Leon Romanovsky <leon@...nel.org> wrote:
> >
> > On Wed, Jun 09, 2021 at 09:26:03AM +0000, Anand Khoje wrote:
> >> Hi Leon,
> >
> > Please don't do top-posting.
> >
> >
> >>
> >> The set_bit()/clear_bit() and enum ib_port_data_flags has been added as a device that can be used for future enhancements.
> >> Also, usage of set_bit()/clear_bit() ensures the operations on this bit is atomic.
> >
> > The bitfield variables are better suit this use case.
> > Let's don't overcomplicate code without the reason.
>
> The problem is always that people tend to build on what's in there. For example, look at the bitfields in rdma_id_private, tos_set, timeout_set, and min_rnr_timer_set.
>
> What do you think will happen when, let's say, rdma_set_service_type() and rdma_set_ack_timeout() are called in close proximity in time? There is no locking, and the RMW will fail intermittently.
We are talking about device initialization flow that shouldn't be
performed in parallel to another initialization of same device, so the
comparison to rdma-cm is not valid here.
Thanks
Powered by blists - more mailing lists