From patchwork Mon Apr 12 08:28:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Kardach X-Patchwork-Id: 91100 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22C05A0C44; 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 B6601140F88; Mon, 12 Apr 2021 10:29:30 +0200 (CEST) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mails.dpdk.org (Postfix) with ESMTP id 749354014E for ; Mon, 12 Apr 2021 10:29:29 +0200 (CEST) Received: by mail-lf1-f43.google.com with SMTP id x13so9878721lfr.2 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=R4H91kWLWRYApQu5k2eDHKaoizHtOQPyXEpeXKZyJ73C7TvD2rILWHD3Z7QFXM2nAO jFXq4nmORhq1Qe3KlCMyJ31Gt/QyX6tjzTaUiOfhVlJYYmsngXp3J7HAaSwpAJjSyfl/ 764Oivh86l2RnPDzcm7t4BuQZir/bhhfQ00szFodaly1VGc9Cf/1koA1wdm1+bUaPQoH b5FlDotQVGBFtX8d7xhjeKg+g4XOczGkwH4nzBZGU8ah36GxSXN4adyQEYKTafJyTqlv ycnkz+DG4pP61DFyJNZNCKFzynL0ZUr9etDoo4TkBEjDAynAKeHbRImfAIHdSw1/0nF2 B4gQ== X-Gm-Message-State: AOAM531kvLq3LkAyYyjyT7GfBD82ljaB8IPTyZWJ9QD92MSopKobPr3z XSbhApgjT+u6tet027pua/rMMw== 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 Subject: [dpdk-dev] [PATCH 0/3] add lock-free stack support discovery 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 Sender: "dev" 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(-)