From: Stephen Hemminger <stephen@networkplumber.org>
To: hepeng <hepeng.0320@bytedance.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] mlx5: fix race at mlx5_dev_close
Date: Mon, 7 Oct 2024 10:54:07 -0700 [thread overview]
Message-ID: <20241007105407.51e6d4c3@hermes.local> (raw)
In-Reply-To: <20240411061740.16495-1-hepeng.0320@bytedance.com>
On Thu, 11 Apr 2024 14:17:40 +0800
hepeng <hepeng.0320@bytedance.com> wrote:
> From: "hepeng.0320" <hepeng.0320@bytedance.com>
>
> mlx5_dev_close currently will set priv->sh->port[priv->dev_port -
> 1].nl_ih_port_id to RTE_MAX_ETHPORTS to avoid mlx5_dev_interrupt_nl_cb
> to use the port's dev_private, because later the rte_eth_dev_close
> will free the dev_private and set the pointer to NULL.
>
> However, since mlx5_dev_interrupt_nl_cb is running in another thread,
> I think the race still exists. So perhaps an easy fix is to wait for
> 1ms to avoid this race.
>
> Signed-off-by: hepeng.0320 <hepeng.0320@bytedance.com>
Not the pest way to handle this. Adding a one second delay on shutdown
hurts some availability scenarios. Looks like mlx5 needs a more coordinated
shutdown to be safe; adding big delays is not the correct fix.
prev parent reply other threads:[~2024-10-07 17:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 6:17 hepeng
2024-10-07 17:54 ` Stephen Hemminger [this message]
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=20241007105407.51e6d4c3@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=hepeng.0320@bytedance.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;
as well as URLs for NNTP newsgroup(s).