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 59801A0C47; Wed, 13 Oct 2021 19:00:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 487D34114B; Wed, 13 Oct 2021 19:00:29 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id A828D40E50 for ; Wed, 13 Oct 2021 19:00:27 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id np13so2693244pjb.4 for ; Wed, 13 Oct 2021 10:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i0fw2PHAZXkFbzmPFpWxNZ7B2DmCs8DmedtR4sFZFjI=; b=DvhQQ+G+63uqhUTmoXc37G55kGTTEZi18531bO7mVyeIX2LoGGadJUOPCwzv1fFyeN 3SgwbRAas7jxhxpLFYEAbAnZCdz/7oSRn4aYI44mKTQ4wsr6LvrnXm2WOc3mi6YjPt+O JhiTxBxItAvYSZW9sTR7NO1Xw0IzCkZvnIwUMhqTuS2fi3PFjleMFywevgWza/QGPqeZ ivT8DLSl2ubEw2KplHwmsSiDiafNhnwSxaGnV4clERqpMAItoMPYGxt4TovOLwCmlGF6 8gXZCmQwZpOR1BJ+i0jboU1xDya183SSFGrvawY5otqdh4MJ+aa8x8KCUs5n3qbVNEr6 i0Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i0fw2PHAZXkFbzmPFpWxNZ7B2DmCs8DmedtR4sFZFjI=; b=VTXvxz+rhu8utAC6aDzHXsxQ+tq+3AdGNSW2Id0EH06ZmBquHzxJbhto0r+y4UgexD Gm/9acxgTO9HvruQdfnb+hdckRs1a1wQeJRMdz3hMUezdOV8zK9Foas7ZLnzLSZMIUy2 lX+KYhX/ljcG5QvmYiTcTM2MJPCAGHsfZrqdUAf4V6r8G+en+45xH5QslbOmQyLcL0xs FDAS77UQxKVF9/rbkv17w905T7HCGmQ0QHsvA2Gwev1l8Xr/lr/V+TT4jw/QjqUp05R0 GkRp0tls6Nn46eeSqDiikG+KhPNDn1p4wMYTjA1nYE5cYXL1q7duQvPFI/39xhQlCwtu aIVQ== X-Gm-Message-State: AOAM530nKt+jY5Vj/tQV3hzXhlq5Ss8m26Fw3VytkgJBmCSRPysiU1Az uRzMxspLUDxoHgqGUKuqzLtKuw== X-Google-Smtp-Source: ABdhPJxoGlV9oHlxQe5YfyY9HUlIkgRw/+fqODjCpANkLOpGvGvrFHlGH/vtq4Hje2FFmWITYKLb8A== X-Received: by 2002:a17:90b:388f:: with SMTP id mu15mr498274pjb.28.1634144426871; Wed, 13 Oct 2021 10:00:26 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id t23sm96819pgn.25.2021.10.13.10.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 10:00:26 -0700 (PDT) Date: Wed, 13 Oct 2021 10:00:23 -0700 From: Stephen Hemminger To: "Ananyev, Konstantin" Cc: Feifei Wang , Ruifeng Wang , "dev@dpdk.org" , nd Message-ID: <20211013100023.7cbe67ee@hermes.local> In-Reply-To: References: <20210902053253.3017858-1-feifei.wang2@arm.com> <20210926063302.1541193-1-feifei.wang2@arm.com> <20210926063302.1541193-2-feifei.wang2@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC PATCH v3 1/5] eal: add new definitions for wait scheme 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 Wed, 13 Oct 2021 15:03:56 +0000 "Ananyev, Konstantin" wrote: > > addr value' can be before other operations. > > > > > BTW, if we expect memorder to always be a constant, might be better > > > BUILD_BUG_ON()? > > If I understand correctly, you means we can replace 'assert' by 'build_bug_on': > > RTE_BUILD_BUG_ON(memorder != __ATOMIC_ACQUIRE && memorder !=__ATOMIC_RELAXED); > > Yes, that was my thought. > In that case I think we should be able to catch wrong memorder at compilation stage. Maybe: RTE_BUILD_BUG_ON(!_constant_p(memorder)); RTE_BUILD_BUG_ON(memorder != __ATOMIC_ACQUIRE && memorder !=__ATOMIC_RELAXED);