From: Thomas Monjalon <thomas@monjalon.net>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Tyler Retzlaff <roretzla@linux.microsoft.com>,
Chengwen Feng <fengchengwen@huawei.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
david.marchand@redhat.com, bruce.richardson@intel.com
Subject: Re: [PATCH v2] doc/eal: add signal safety warning
Date: Mon, 11 Jul 2022 23:15:26 +0200 [thread overview]
Message-ID: <3005473.57xzQst1vy@thomas> (raw)
In-Reply-To: <20220705204401.158650-1-stephen@networkplumber.org>
05/07/2022 22:44, Stephen Hemminger:
> The DPDK is not designed to be used from a signal handler.
> Add a notice in the documentation describing this limitation,
> similar to Linux signal-safety manual page.
>
> Bugzilla ID: 1030
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
> doc/guides/prog_guide/env_abstraction_layer.rst | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst
> index 67842ae27207..de7ee92bba39 100644
> --- a/doc/guides/prog_guide/env_abstraction_layer.rst
> +++ b/doc/guides/prog_guide/env_abstraction_layer.rst
> @@ -818,6 +818,21 @@ Known Issues
>
> The debug statistics of rte_ring, rte_mempool and rte_timer are not supported in an unregistered non-EAL pthread.
>
> ++ signal safety
> +
> + The DPDK library is not designed to be async-signal-safe.
> + Except where explicitly stated otherwise [#]_, the DPDK functions are nonreentrant and are unsafe to call from a signal handler.
> +
> +.. [#] Only the function ``rte_dump_stack()`` can safely be called from signal handler in this version of DPDK.
Really? Are you sure?
Note: the use of [#] is probably limited to a single usage in the page?
> +
> +.. note::
> + The kinds of issues that make DPDK functions unsafe can be understood when
> + one considers that much of the code in DPDK uses locks and other shared
> + resources. If a device driver holding a ``rte_spinlock`` is interrupted
> + by a signal and control operation is then performed that would acquire
> + the same lock, a deadlock would result.
I find this note quite confusing.
next prev parent reply other threads:[~2022-07-11 21:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 15:23 [PATCH] doc/eal: add signal safety warning Stephen Hemminger
2022-06-10 22:53 ` Tyler Retzlaff
2022-06-10 23:38 ` Stephen Hemminger
2022-06-10 23:42 ` Tyler Retzlaff
2022-06-11 1:37 ` fengchengwen
2022-06-11 16:50 ` Mattias Rönnblom
2022-07-05 20:44 ` [PATCH v2] " Stephen Hemminger
2022-07-11 21:15 ` Thomas Monjalon [this message]
2022-07-11 21:31 ` Stephen Hemminger
2022-10-21 19:58 ` Stephen Hemminger
2022-07-11 23:02 ` [PATCH v3] " Stephen Hemminger
2022-07-11 23:04 ` [PATCH v4] " Stephen Hemminger
2022-11-09 23:17 ` Stephen Hemminger
2022-11-15 16:21 ` David Marchand
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=3005473.57xzQst1vy@thomas \
--to=thomas@monjalon.net \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=roretzla@linux.microsoft.com \
--cc=stephen@networkplumber.org \
/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.