Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2530598pxj; Mon, 14 Jun 2021 00:27:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqNKu+MXK8QYfswjY0+1sIke2xahtXlcRnNkuWs/xZ1Ag06Ilcn5rY+fpSGo9cATY/SFEq X-Received: by 2002:a17:906:2b04:: with SMTP id a4mr13766072ejg.6.1623655677232; Mon, 14 Jun 2021 00:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623655677; cv=none; d=google.com; s=arc-20160816; b=jxKL7LvJQBFMEjOiO6F+xuTfcnokWmpZR+xG1EFQqfrZT3DKzTxtRUD6bL+hYq2yYW rw5bwBBCkbfGpMmwAreCq3dBkFmPlk+3Tztisr9xWSLJAR0ZBYJuKSGKt638yxWUE20/ aDnm3CKN2piSH16tPTKJ6wOrQ8tnOb10CxoZDMkiSgVdYaeXIN5I4pRVF2daOlyYjEFv RPW2VOj4KZ3WJhbIaUt/X1JVkvau/hcfrgGTKe1RFWw1HjMzGiOMIPQSDiRJt2CSB5Nk 4QfG64RtYl2AnsIh5dwmUnvWQD2K74uCXw2p3xqD9/uRNURadk4HQ8ajzw1b3nN1+vnh t1xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gXpoQ7Ci4WzRI1p8sBTZGbXhwag3nAYZfIBascO4KZc=; b=gY4biZOdfh45904/4Pwg0oMaJxMQECIHl4k8ERZqMfY6PQEIgvB1uFg2P6j3dhfl9b huks8mP/pdrRKi1paeyK8Yn/2N2lanNC7t0RZ8Ae8BMRupiMrDhYfWTAjAlghAG1wY0s +penRS7zDy0R3Td1i8kM71cn3UQPKRAsRqJ7hc0l/iy9C8WrAt1eEQG6+gqx4Ea5T0Dc CURGnNdnlzmIhPB789GTVcgnBRFQPUqfwWoRwbF04vPLG0AVMbSnC3nTGjpZqd6Ddrp5 rcfKNjyd8XoxS67Tz2VLH1Xq0DeV5dj963NFE6tEs7FPSnhKgms7tsQ+Yc7Bnpjqscrh v18Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N3VcW2tw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si12143470ejp.119.2021.06.14.00.27.33; Mon, 14 Jun 2021 00:27:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N3VcW2tw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232494AbhFNH1j (ORCPT + 99 others); Mon, 14 Jun 2021 03:27:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:51972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232454AbhFNH1j (ORCPT ); Mon, 14 Jun 2021 03:27:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 45D85613C3; Mon, 14 Jun 2021 07:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623655535; bh=6fnOGnEJwjNZCWpw7r4U37RPUuXg/sl8PL80A20gFpQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=N3VcW2twsucfZ5JVLqWfrdl6FdDF5BezyhACYGnXM5FIJLXrc8AQhF8mki5SjLSRJ FPbzurCr4ah3RsNQPnd035M3MxHyy7ltauDLCkzezA8SZhA6MwaZnhJPkiWh5PTsVY yFWSmdxezPAD4YXFgsuQr5n18Lt2wDNvs51b/jF2Ht21DeH0MOYRLAv9A1whVIIBh8 i3/Kgzghp39e+d7/FGfAollPDoaZ39zivMeuD23UVn3OnpIDGuGlGN0DLjscDGkYQT vToYT1IK8t4NSZIA6mnMVmBxZ8JzFJpwyHGhoTMEt8hQc/abUfwIx2jNBQqpQzA+IY XkP+6VwMordvg== Date: Mon, 14 Jun 2021 10:25:32 +0300 From: Leon Romanovsky To: Haakon Bugge Cc: Anand Khoje , OFED mailing list , "linux-kernel@vger.kernel.org" , "dledford@redhat.com" , "jgg@ziepe.ca" Subject: Re: [PATCH v3 3/3] IB/core: Obtain subnet_prefix from cache in IB devices. Message-ID: References: <20210609055534.855-1-anand.a.khoje@oracle.com> <20210609055534.855-4-anand.a.khoje@oracle.com> <30CD8612-2030-44C1-A879-9A1EC668FC9C@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <30CD8612-2030-44C1-A879-9A1EC668FC9C@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 14, 2021 at 03:32:39AM +0000, Haakon Bugge wrote: > > > > On 9 Jun 2021, at 12:40, Leon Romanovsky 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