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 52C9FA0A02; Tue, 27 Apr 2021 15:54:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38CD14124B; Tue, 27 Apr 2021 15:54:52 +0200 (CEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 6E6D84014E for ; Tue, 27 Apr 2021 15:54:51 +0200 (CEST) Received: by mail-wm1-f43.google.com with SMTP id y124-20020a1c32820000b029010c93864955so7165936wmy.5 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=EFhHdRi/q3wPa13JJeRHn5CcjggEsuAYBlQ2aIsv4VixK9zEnacNehWCGEQwj6sI6R l5XAkQqPuzvqM5OJgAJWczFKvI2cNlQMMXPXAvXn5+bP0NlloLSxcvxfnzqHYtqi1tXg qBOaG5wVU5dXSKRm7ZiuBagn8YdKxygaWSZ7D1ciudV38uw9hZLMNswZ5ukoCQ7rcSM6 r2FkkazbceXerg4RkZ64Qzr+fXpG3D9LnWiwiYvobN+wV2QHOG0TZO0TYn4DEpk9CtZu wDhex9EyJo1dpSfTEhm/f7NkG7i5a/zdr5zd4ADHbglMe5xuAof6lbDU1OlVe55kNkZY +44A== X-Gm-Message-State: AOAM530oM6w3bZIue7rA4cTrYpDOOKDwuTf/EM7nqHayp40Ip7EQQUnG DJzuMlWbfjd0x/sU52RjHYtAyg== 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-dev] [PATCH 2/3] stack: add lock-free support indication 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" 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