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 D8974A0C47 for ; Mon, 12 Apr 2021 10:29:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C8B234068E; Mon, 12 Apr 2021 10:29:31 +0200 (CEST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by mails.dpdk.org (Postfix) with ESMTP id 7C2174068E for ; Mon, 12 Apr 2021 10:29:29 +0200 (CEST) Received: by mail-lf1-f51.google.com with SMTP id b14so20011975lfv.8 for ; Mon, 12 Apr 2021 01:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vewlak+FqWPyil4AUIUcrvD2gQ5X0FHMsFKWyN5U1B4=; b=X+8tn/dX3Y+PGB5Succ9tAE7I2z2xpoj5fWSTAFtZUe7cW+qqiqNmw/95nP7NXrM4k A1tksO9Ljvf6H/EunJQ2EKBfHa3RxXKmzQqipKm/wK6gn2byYCP/8/s4pBO1THEXUzhV 00M7UsE3wjoBUZKRyeuJ/Vh0L7wdeVcLKCvmOm7axHAYmvNTxe/ogRV04oJPIpA/VjyX heLdd8rZ6+hpb8JG75Znt8hgr7Ry5ZZPKzlGs0Bd5LRiR+L+kEK6yK//yXkGE1jZtqFQ jgTapS/2KyyDtid9/KMWCvnusS7yEM0pkv+IsrtfFIevIabi/8Y45blT3yQPIMxjWGGI 0E+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vewlak+FqWPyil4AUIUcrvD2gQ5X0FHMsFKWyN5U1B4=; b=bMTBJJZP/ZO/2355Db6Dl9yBQqLQL3YEEl79VzS+vbXGKJZZd+GSq1Y6q1muE0B6V7 PLztLo5Fb1ukLJtsOFOSlkhZVt/Wr4xaiw0oz6FIsHtTM47wdVfaRcn0JdOHGsfzxHo+ 14CnMIh9lOmcl4A8tA5SIftp9/cWS0cG+sJHfF+AiVOqVnjKDs73rMfTLeoFZ4v50ozi uhguRr4php7KIaenbnbkojrJ6V5FdGX2sWQh2VBJ+BHdk0Edep1sMKVuKxZPHWc6xljd RHYxYmTOm1GnlgGkWe8RxeYj/1Pf0e6jOpmKmVaECxY7rpWbcfNpHJQMTwPiEw6oLPkO KxLQ== X-Gm-Message-State: AOAM532qc3tfQnP5fXiRo+tfu22vfX5Kmp7wQSC7Q4VsnpoIOOzAtU8y iLvV9VjVEobmzvej4BcOeJMi5A== X-Google-Smtp-Source: ABdhPJwwXMWvEWtn/kY69tv9/4Vs94ISdoQg1bZrGjctHswxNekC4rB/9IR/FTi24JpDbbSVSEdG6w== X-Received: by 2002:a19:3804:: with SMTP id f4mr19061374lfa.117.1618216168942; Mon, 12 Apr 2021 01:29:28 -0700 (PDT) Received: from toster.semihalf.com (host-193.106.246.139.static.3s.pl. [193.106.246.139]) by smtp.gmail.com with ESMTPSA id x4sm2691118ljd.112.2021.04.12.01.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 01:29:28 -0700 (PDT) From: Stanislaw Kardach To: Olivier Matz Cc: dev@dpdk.org, Stanislaw Kardach , stable@dpdk.org Date: Mon, 12 Apr 2021 10:28:58 +0200 Message-Id: <20210412082901.652736-1-kda@semihalf.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 0/3] add lock-free stack support discovery X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" The lock-free stack implementation (RTE_STACK_F_LF) is supported only on a subset of platforms, namely x86_64 and arm64. Platforms supporting 128b atomics have to opt-in to a generic or C11 implementations. All other platforms use a stubbed implementation for push/pop operations which are basically NOPs. However rte_stack_create() will not fail and application can proceed assuming it has a working lock-free stack. This means that among other things the stack_lf fast and perf tests will fail as if implementation is wrong (which one can argue is). Therefore this patchset tries to give user a way to check whether a lock_free is supported or not both at compile time (build flag) and at runtime (ENOTSUP errno in rte_stack_create). I have added cc to stable@dpdk.org because check-git-log.sh suggested it. I'm not sure if adding a binary compatible change to API is worth stable@dpdk.org. Cc: stable@dpdk.org Stanislaw Kardach (3): stack: update lock-free supported archs stack: add compile flag for lock-free support test: run lock-free stack tests when supported app/test/test_stack.c | 4 ++++ app/test/test_stack_perf.c | 4 ++++ doc/guides/rel_notes/release_21_05.rst | 4 ++++ lib/librte_stack/rte_stack.c | 4 +++- lib/librte_stack/rte_stack.h | 3 ++- lib/librte_stack/rte_stack_lf.h | 5 +++++ 6 files changed, 22 insertions(+), 2 deletions(-) -- 2.27.0