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 8C9D1A0553; Fri, 10 Jun 2022 17:23:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 324C44069C; Fri, 10 Jun 2022 17:23:51 +0200 (CEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 781AE40689 for ; Fri, 10 Jun 2022 17:23:50 +0200 (CEST) Received: by mail-pj1-f54.google.com with SMTP id cx11so24306726pjb.1 for ; Fri, 10 Jun 2022 08:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6EVjiI0RGnEKYAgZI6Ro1tvSIazdK2JIutoVWDSd8gU=; b=e9cggcZaa/uasr0SArSbBi+55UqGT9ZpEFQDYpFi1I1VQpFABtYr3nWe2yjGLuNxLz NaFWTab1+pmwH7f6dQIiSHLOId7DrdPnSdKJ2SvzM8W5lS648BCyNCIOzhT8CCe+3DaT wRw5LLFI183CmyOhCn/UtTJslZ9yhCEpt5civPuEpeK0lCzyTpymGR8rhVzc/XIA9j4n QEQzQDQzDKaSqCavEMAPigSDmZAkNWDlGXx8BflDDojOFwlTFhGi2Y6iB6UL2pyySZVG dbnDqLsHnSStmewY91JkK/5YADtGF0VPbx8GVtwS4xBlVc2qmu8jTK6/YcDW6BdqOTQ+ bG2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6EVjiI0RGnEKYAgZI6Ro1tvSIazdK2JIutoVWDSd8gU=; b=iQcCtM5F3W2LmToTeSxOU7MaxhQxBNjqZv3d52vzdwSufQsWbI5kipsYxeMDQp4MYn 2c/AOxdVjlkwxiqMH7MoyynkYLVmvWpb6jTyzLK5Q01PF6vqUR5pd8y3q8oscNcbBGkU O9VZ+8SghoCpfsWinybwTkdQoBq8rH3obqIB2PiSL+m2YT4oQ3gRGyBzfwggdtp1N7C2 HKjq5FNvbMAqQc2CTJwRTq+olh7f0nK+OmN26m6f/HVwI2aarCosevrlHAEZ1INn/McV dOOo6FTezLfLTI/GxOoZ0loGHph/JhiWWyt25xvTUczmYt9bjJzEn3y+Mj3CilGQroxW c9ew== X-Gm-Message-State: AOAM530YcXDdwu6MN94Z9p5RVhIEqFZtC1b7HvPSAsnZMGcbELtIMrgR gtYlYn599UQ7FGKK8R3vG0sGWjEAl+KUJDoz X-Google-Smtp-Source: ABdhPJwIdCGca3yuy/fYJoWkiYTqc0UDssv0Ss8EavKouGFKtugmPJGBD+PqKozaf8N6scx+UEgKuA== X-Received: by 2002:a17:90a:2c0c:b0:1ea:14c0:f0ca with SMTP id m12-20020a17090a2c0c00b001ea14c0f0camr249671pjd.143.1654874629188; Fri, 10 Jun 2022 08:23:49 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id cb8-20020a056a00430800b0050dc7628155sm16338718pfb.47.2022.06.10.08.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 08:23:48 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: anatoly.burakov@intel.com, Stephen Hemminger Subject: [PATCH] doc/eal: add signal safety warning Date: Fri, 10 Jun 2022 08:23:43 -0700 Message-Id: <20220610152343.38455-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 --- 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