DPDK patches and discussions
 help / color / mirror / Atom feed
From: fengchengwen <fengchengwen@huawei.com>
To: Tyler Retzlaff <roretzla@linux.microsoft.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <anatoly.burakov@intel.com>
Subject: Re: [PATCH] doc/eal: add signal safety warning
Date: Sat, 11 Jun 2022 09:37:02 +0800	[thread overview]
Message-ID: <a92931e9-5bf1-bb27-db4c-ae3bc4761070@huawei.com> (raw)
In-Reply-To: <20220610234240.GC14494@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>

On 2022/6/11 7:42, Tyler Retzlaff wrote:
> On Fri, Jun 10, 2022 at 08:23:43AM -0700, Stephen Hemminger wrote:
>> 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 | 13 +++++++++++++
>>  1 file changed, 13 insertions(+)
>>
>> diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst
>> index 5f0748fba1c0..36ab4b5ba9b6 100644
>> --- a/doc/guides/prog_guide/env_abstraction_layer.rst
>> +++ b/doc/guides/prog_guide/env_abstraction_layer.rst
>> @@ -732,6 +732,19 @@ controlled with tools like taskset (Linux) or cpuset (FreeBSD),
>>  - with affinity restricted to 2-3, the Control Threads will end up on
>>    CPU 2 (main lcore, which is the default when no CPU is available).
>>  
>> +Signal Safety
>> +~~~~~~~~~~~~~
>> +
>> +The DPDK functions in general can not be safely called from a signal handler.
>> +Most functions are not async-signal-safe because they can acquire locks
>> +and other resources that make them nonrentrant.
>> +
>> +To avoid problems with unsafe functions, can be avoided if required
>> +signals are blocked and a mechanism such as signalfd (Linux) is used
>> +to convert the asynchronous signals into messages that are processed
>> +by a EAL thread.
>> +
>> +
>>  .. _known_issue_label:
>>  
>>  Known Issues
>> -- 
>> 2.35.1
> 
> .
> 


  reply	other threads:[~2022-06-11  1:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 15:23 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 [this message]
2022-06-11 16:50 ` Mattias Rönnblom
2022-07-05 20:44 ` [PATCH v2] " Stephen Hemminger
2022-07-11 21:15   ` Thomas Monjalon
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=a92931e9-5bf1-bb27-db4c-ae3bc4761070@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --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 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).