Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Cc: leon@kernel.org, linux-rdma@vger.kernel.org,
	andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com,
	kalesh-anakkur.purayil@broadcom.com
Subject: Re: [PATCH rdma-next v6 7/9] RDMA/bnxt_re: Enhance dpi lifecycle logic in doorbell uapis
Date: Tue, 19 May 2026 11:40:49 -0300	[thread overview]
Message-ID: <20260519144049.GF7702@ziepe.ca> (raw)
In-Reply-To: <CAHHeUGUeQssyz2fsb_aOzgi=wu2KaCyRJHU7vBC=wk4XRbpgOQ@mail.gmail.com>

On Tue, May 19, 2026 at 07:29:08PM +0530, Sriharsha Basavapatna wrote:
> "Does tying the hardware DPI slot lifecycle to the VMA lifecycle allow
> userspace to exhaust the hardware DPI pool? If a process allocates a
> DBR object, maps it via mmap(), and then immediately destroys the DBR
> object, the uverbs object is freed (replenishing the process's general
> RDMA object quota). Since the active VMA keeps the mmap entry alive,
> bnxt_re_mmap_free() is not called, and the hardware DPI slot is
> leaked. Could a user repeat this process to hoard hardware DPI slots
> until the device's entire DPI table capacity is exhausted?"

Yes that's true, but nothing you can do about this without moving the
lifecycle to the uobject, which we don't have infrastructure for.

> Even without this change, the DBR_ALLOC() uverb allows a process to
> allocate multiple DPIs (that are meant to be distributed across QPs).
> We don't want to restrict it. Again here, the library properly handles
> this by unmapping and destroying each DBR object.

Yes, but there is a cgroup limit on the number of uobjs a driver can
create, so it can be technically limited.

Jason


  reply	other threads:[~2026-05-19 14:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 15:37 [PATCH rdma-next v6 0/9] RDMA/bnxt_re: Support QP uapi extensions Sriharsha Basavapatna
2026-05-18 15:37 ` [PATCH rdma-next v6 1/9] RDMA/bnxt_re: Refactor bnxt_re_init_user_qp() Sriharsha Basavapatna
2026-05-18 15:37 ` [PATCH rdma-next v6 2/9] RDMA/bnxt_re: Update rq depth for app allocated QPs Sriharsha Basavapatna
2026-05-18 15:37 ` [PATCH rdma-next v6 3/9] RDMA/bnxt_re: Update sq " Sriharsha Basavapatna
2026-05-18 15:37 ` [PATCH rdma-next v6 4/9] RDMA/bnxt_re: Update msn table size " Sriharsha Basavapatna
2026-05-18 15:37 ` [PATCH rdma-next v6 5/9] RDMA/bnxt_re: Update hwq depth " Sriharsha Basavapatna
2026-05-18 15:37 ` [PATCH rdma-next v6 6/9] RDMA/bnxt_re: Enhance dbr usecnt logic in doorbell uapis Sriharsha Basavapatna
2026-05-18 15:37 ` [PATCH rdma-next v6 7/9] RDMA/bnxt_re: Enhance dpi lifecycle " Sriharsha Basavapatna
2026-05-19  9:27   ` Sriharsha Basavapatna
2026-05-19 12:46     ` Jason Gunthorpe
2026-05-19 13:20       ` Sriharsha Basavapatna
2026-05-19 13:27         ` Jason Gunthorpe
2026-05-19 13:59           ` Sriharsha Basavapatna
2026-05-19 14:40             ` Jason Gunthorpe [this message]
2026-05-19 15:17               ` Sriharsha Basavapatna
2026-05-18 15:37 ` [PATCH rdma-next v6 8/9] RDMA/bnxt_re: Support doorbells for app allocated QPs Sriharsha Basavapatna
2026-05-18 15:37 ` [PATCH rdma-next v6 9/9] RDMA/bnxt_re: Enable " Sriharsha Basavapatna

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=20260519144049.GF7702@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=selvin.xavier@broadcom.com \
    --cc=sriharsha.basavapatna@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox