From: Maher Sanalla <msanalla@nvidia.com>
To: Jian Wen <wenjianhn@gmail.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
leonro@nvidia.com, Jian Wen <wenjian1@xiaomi.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/mlx5: Use mlx5_cmd_is_down to detect PCIe Surprise Link Down
Date: Mon, 26 Jan 2026 11:32:17 +0200 [thread overview]
Message-ID: <8ff2f0ad-27c2-4446-bb63-d500f5e8201a@nvidia.com> (raw)
In-Reply-To: <CAMXzGWKbt1+U6O2EUuzFRbbUc7Qx7Xy+2+1WCk5_OASejJN=JQ@mail.gmail.com>
Hey Jian,
Yes. This is the fix we went with ultimately:
[1/1] RDMA/mlx5: Fix UMR hang in LAG error state unload
https://git.kernel.org/rdma/rdma/c/ebc2164a4cd431
On 22/01/2026 11:36, Jian Wen wrote:
> *External email: Use caution opening links or attachments*
>
>
> Hi Maher,
>
> Has the fix released yet?
>
> Thanks.
>
>
> Maher Sanalla <msanalla@nvidia.com <mailto:msanalla@nvidia.com>>于2025年
> 10月16日 周四21:32写道:
>
>
>
> On 09/10/2025 21:02, Jason Gunthorpe wrote:
> > External email: Use caution opening links or attachments
> >
> >
> > On Thu, Oct 09, 2025 at 10:23:20PM +0800, Jian Wen wrote:
> >> --- a/drivers/infiniband/hw/mlx5/umr.c
> >> +++ b/drivers/infiniband/hw/mlx5/umr.c
> >> @@ -254,7 +254,7 @@ static int mlx5r_umr_post_send(struct ib_qp
> *ibqp, u32 mkey, struct ib_cqe *cqe,
> >> unsigned int idx;
> >> int size, err;
> >>
> >> - if (unlikely(mdev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR))
> >> + if (unlikely(mlx5_cmd_is_down(mdev)))
> >> return -EIO;
> >
> > I feel like this is just changing the race around..
> >
> > The removal flow for the device is different if the HW is working
> than
> > if it isn't.
> >
> > If it isn't working then the removal should disable and cancel
> all the
> > UMRs, using the umrc->lock. Otherwise there will be dead threads
> > floating around. It should also be setting
> > MLX5_DEVICE_STATE_INTERNAL_ERROR way at the start of removal.
> >
> > So IDK, maybe check mlx5_cmd_is_down() and trigger the flow to
> > activate INTERNAL_ERROR befor doing anything else?
> >
> > Jason
> >
>
> I agree with Jason concern. While this may serve as a workaround for
> certain cases, the race condition still exists. We’re aware of this
> issue and are working on a proper fix. The intended solution is that
> when the device enters an error state, the UMR state should transition
> directly to error as well, preventing any new UMRs from being posted.
>
> Maher
>
next prev parent reply other threads:[~2026-01-26 9:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 14:23 [PATCH] RDMA/mlx5: Use mlx5_cmd_is_down to detect PCIe Surprise Link Down Jian Wen
2025-10-09 17:49 ` Leon Romanovsky
2025-10-09 18:02 ` Jason Gunthorpe
2025-10-16 13:32 ` Maher Sanalla
[not found] ` <CAMXzGWKbt1+U6O2EUuzFRbbUc7Qx7Xy+2+1WCk5_OASejJN=JQ@mail.gmail.com>
2026-01-26 9:32 ` Maher Sanalla [this message]
2025-10-11 23:35 ` kernel test robot
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=8ff2f0ad-27c2-4446-bb63-d500f5e8201a@nvidia.com \
--to=msanalla@nvidia.com \
--cc=jgg@nvidia.com \
--cc=leonro@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=wenjian1@xiaomi.com \
--cc=wenjianhn@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.