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 74734A0A02 for ; Tue, 27 Apr 2021 15:54:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6AAAA41252; Tue, 27 Apr 2021 15:54:53 +0200 (CEST) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id 7D33E4124B for ; Tue, 27 Apr 2021 15:54:51 +0200 (CEST) Received: by mail-wm1-f41.google.com with SMTP id k128so31874766wmk.4 for ; Tue, 27 Apr 2021 06:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WGd0lnGWOuYMtThxRa1seMvHxcIyT/W0RN8RQQdwCMc=; b=ijxRmnMcKQ8Ft+kScW1g8nlegmYDOoTFwUm35limLX2MYXNcRfxXJJd6pNfshXt2Eh FOX0hxau48qIx6Jb75AFDsh/wZ1uS0Kh71mBg34fLpSIffzc+xvg5RPR3z8itxvQUj+i GB8EaFhmFKZljc2lGUpPpn7XIUDBqmNMZwAtRxUQg1b8OrV+qiBKUyL3xR3iBgYRUCMN 55utYG8mD8EExP4vPZrUe9IPRLjD6RKVJElrzetdd6sU49qI0eJTnYpSdU4leoo3S4yu 2JEmRlsxAQ81mShbZ5C17SZtWW1rSYIaWRzp7Yl58b+FZgHDZ8yd1RsNGIYoU9LgCG8y xfSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=WGd0lnGWOuYMtThxRa1seMvHxcIyT/W0RN8RQQdwCMc=; b=EUcHDuP4qnLTTFyY9GYW/FgL3y6OZlnvg/YSIFR5D8RhQor7SsjjWiPAjDC2j/iaxv HcMxKvvg8StxKP0rxXHGDNMVsShsesDUkQ5hicsx/gsMwkEjmbee1Uxc03M9Ir0GAWZQ cQtnZFykpdptQNRhccaPBSSHtOTq3q6bgMopbx97nkbEwumEGLsGj0Vmjg73DS9lR5W6 px9XHPHzToEflvUcIiU3Q/ctNOwxUlNaAd0xNIRc0AXuyBnUfljZcxqoWeHHmQ4Sykcc QggaYBrcLE98cE1ohk27amWYbi9Rkvk9Uv2tDoe4EkQoP6maz++0eK2oxASxcrfWd4NE i7Kw== X-Gm-Message-State: AOAM533m1qUMeyFVYf9TkdOphM0i5edvvZIRMo81tNUd8wgUKW+Ym7F5 JtVZRNecJwEX5en8IgKxjBdFUA== X-Google-Smtp-Source: ABdhPJww+iS3EU3/4XLE9ao2aqdbThSKQiF9L1jnVpDgip6QjrxV0R2WXhV0aNCi55dCOtN+VfFAKg== X-Received: by 2002:a05:600c:4ec9:: with SMTP id g9mr4401442wmq.145.1619531691219; Tue, 27 Apr 2021 06:54:51 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id v17sm4107762wrd.89.2021.04.27.06.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 06:54:50 -0700 (PDT) Date: Tue, 27 Apr 2021 15:54:50 +0200 From: Olivier Matz To: Stanislaw Kardach Cc: dev@dpdk.org, phil.yang@arm.com, stable@dpdk.org Message-ID: <20210427135450.GN1726@platinum> References: <20210412082901.652736-1-kda@semihalf.com> <20210412082901.652736-3-kda@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210412082901.652736-3-kda@semihalf.com> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-stable] [PATCH 2/3] stack: add lock-free support indication 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" On Mon, Apr 12, 2021 at 10:29:00AM +0200, Stanislaw Kardach wrote: > Currently it is impossible to detect programatically whether lock-free > implementation of rte_stack is supported. One could check whether the > header guard for lock-free stubs is defined (_RTE_STACK_LF_STUBS_H_) but > that's an unstable implementation detail. Because of that currently all > lock-free ring creations silently succeed (as long as the stack header > is 16B long) which later leads to push and pop operations being NOPs. > The observable effect is that stack_lf_autotest fails on platforms not > supporting the lock-free. Instead it should just skip the lock-free test > altogether. > > This commit adds a new errno value (ENOTSUP) that may be returned by > rte_stack_create() to indicate that a given combination of flags is not > supported on a current platform. > This is detected by checking a compile-time flag in the include logic in > rte_stack_lf.h which may be used by applications to check the lock-free > support at compile time. > > Signed-off-by: Stanislaw Kardach > Fixes: 7911ba0473e0 ("stack: enable lock-free implementation for aarch64") > Cc: phil.yang@arm.com > Cc: stable@dpdk.org Acked-by: Olivier Matz