From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3EF68A054F; Sat, 11 Jun 2022 01:42:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E439440222; Sat, 11 Jun 2022 01:42:42 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 19FFE40041 for ; Sat, 11 Jun 2022 01:42:41 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 384C520BE6B9; Fri, 10 Jun 2022 16:42:40 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 384C520BE6B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1654904560; bh=ZXHU9QNm0O3vEQABKocJJWoI6dOvhyuEUg42/4ZkbwI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r4QGep5Tnn7sCePsssMv4DI1K9UqX4etn9VaXJy/NrSwV1Sar8I/dN/FIXHd5k5ec xR+aYhuSGTCaWQXy1sisfYv54u4MdsQLbAIum1q7Du85J90uRpBFEmUzHGvaq/OWVS bP86K7L9jbZQ60Hu3Y4zg+VgwI8/ulsAznAltWTY= Date: Fri, 10 Jun 2022 16:42:40 -0700 From: Tyler Retzlaff To: Stephen Hemminger Cc: dev@dpdk.org, anatoly.burakov@intel.com Subject: Re: [PATCH] doc/eal: add signal safety warning Message-ID: <20220610234240.GC14494@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20220610152343.38455-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220610152343.38455-1-stephen@networkplumber.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Acked-by: Tyler Retzlaff > --- > 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