All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pearson, Robert B" <robert.pearson2@hpe.com>
To: Jason Gunthorpe <jgg@nvidia.com>, Bob Pearson <rpearsonhpe@gmail.com>
Cc: Leon Romanovsky <leon@kernel.org>,
	"zyjzyj2000@gmail.com" <zyjzyj2000@gmail.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"Zago, Frank" <frank.zago@hpe.com>
Subject: RE: [PATCH for-next] RDMA/rxe: Fix ib_device reference counting (again)
Date: Mon, 1 Mar 2021 18:20:06 +0000	[thread overview]
Message-ID: <CS1PR8401MB08218976C89D1C7B20394B4DBC9A9@CS1PR8401MB0821.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20210301173540.GN4247@nvidia.com>


> From: Jason Gunthorpe <jgg@nvidia.com> 
> Sent: Monday, March 1, 2021 11:36 AM
> To: Bob Pearson <rpearsonhpe@gmail.com>
> Cc: Leon Romanovsky <leon@kernel.org>; zyjzyj2000@gmail.com; linux-rdma@vger.kernel.org; Zago, Frank <frank.zago@hpe.com>
> Subject: Re: [PATCH for-next] RDMA/rxe: Fix ib_device reference counting (again)

> On Mon, Mar 01, 2021 at 10:54:21AM -0600, Bob Pearson wrote:

>> I agree that ib_device_get/put is attempting to solve a problem that 
>> it not really very critical since ib_device is very unlikely to be 
>> shut down in the middle of a data transfer. The driver never worried about this for years.
>> But now that it's been put on the table it should be done right. A 
>> data packet arriving is completely independent of the verbs API which 
>> *could* delete all the QPs and shut down the HCA while it was 
>> wondering around the universe or worse yet while the packet is being processed.

> If driver shutdown can guarentee that all pointers involved in multicast are revoked before shutdown can finish then you don't need this
> refcounting.

> It was only brought up because the API that returns the ib_device from the netdev requires the refcounts as it is general purpose

> Jason
Unfortunately what you ask for is exactly what the refcounting code accomplishes and I don't see a simpler way to get there.
This also applies to the non-multicast packets as well but all the debate has been about the code in rxe_rcv_mcast_pkt()
because it is more blatant there or because I haven't been able to explain how it works well enough.

Bob

  reply	other threads:[~2021-03-01 18:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-14 22:26 [PATCH for-next] RDMA/rxe: Fix ib_device reference counting (again) Bob Pearson
2021-02-15  3:46 ` Zhu Yanjun
2021-02-15  5:59 ` Leon Romanovsky
2021-02-26 23:28 ` Bob Pearson
2021-02-26 23:33   ` Jason Gunthorpe
2021-02-27  0:02     ` Bob Pearson
2021-02-27  8:43       ` Leon Romanovsky
2021-02-28 17:04         ` Bob Pearson
2021-03-01  7:24           ` Leon Romanovsky
2021-03-01 16:54             ` Bob Pearson
2021-03-01 17:35               ` Jason Gunthorpe
2021-03-01 18:20                 ` Pearson, Robert B [this message]
2021-03-01 18:27                   ` Jason Gunthorpe
2021-03-02  8:11                     ` Leon Romanovsky
2021-03-01  7:42           ` Zhu Yanjun
2021-03-02  5:19 ` Zhu Yanjun
2021-03-02  7:26   ` Robert Pearson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CS1PR8401MB08218976C89D1C7B20394B4DBC9A9@CS1PR8401MB0821.NAMPRD84.PROD.OUTLOOK.COM \
    --to=robert.pearson2@hpe.com \
    --cc=frank.zago@hpe.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.