From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9A605A00C2; Fri, 24 Apr 2020 21:02:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 51AEB1D525; Fri, 24 Apr 2020 21:02:25 +0200 (CEST) Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by dpdk.org (Postfix) with ESMTP id 996331D523 for ; Fri, 24 Apr 2020 21:02:23 +0200 (CEST) Received: by mail-pj1-f68.google.com with SMTP id ms17so4250214pjb.0 for ; Fri, 24 Apr 2020 12:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=e8iXjaRfjqH4/9K/5mjs5vGsdT5cHA0NfKMP83A6msg=; b=r+KBREfC6WtGgUBxdGFIGnfZ7Nu9xk1A+9UR4cZuzmRfHiqhh4WZIg+tpCTjpxBllD czNjOkSlVV8D8YGN3cUT1kr82HiwiP1s8+8dPjv0tgpSmq7ozrhSDmvHdYI92gKnwsOs FuTIYz2e8IF/jgxC1ZTLMWBmZZpyq88fJEpS9ZE0wsoFn4oXz9g6x+RAM3CtCCi7XE+I 6SMwCwgQ9gSE6FW/K3eEXOIQXXjD61uzsj1jU4G+uTb7Enb5e/mm/2bd/KcUJ6A3cmKQ /nEX/1ZVL1bLQfd8beSbal0tcInsFwnX11ib84v1n2v0JVqp3WpRqJd8gbEnOzvVeYyy XDww== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=e8iXjaRfjqH4/9K/5mjs5vGsdT5cHA0NfKMP83A6msg=; b=cX1WD2SkZ6n1AgPOgKRhmwbmt3lxodlDT6Rxewyr7um8OKd9BnEdVvF6VDw8Jkrv2u 1xV5aBm95VM9XH7FWfbSY2wDVjQiyZJkqi/cZuQN0E+0ELIY9dATfVIDgOTGFR8uSCEk QRVGpBSmOqTAYCFFg2C0o8Z0XyElQNLjNlWCk1oMptlEoW4GbEUqPngfWLr6tf2PIQsS 0o6WTl92NaMKc8Z3sCi1fy4AmID8m3Kd3DvLjgrm/lo0aYQ40dIvzOGS2ccdlQSl/AlR 6eBb1QfrqlajZE7ktWKVh2P6F1MiwC+z1JB+Tk0oPSxrKFj54gAfLkubSsjmReOAPeQS djqw== X-Gm-Message-State: AGi0PuZ/86AVRZSwQjh8JTohKPNiybN972jDOaa0efFGyxjUBFh7Fv89 2qDRlqN2mDPxV/5Yn8FY9nQuOqoJeU0= X-Google-Smtp-Source: APiQypKB87Cw7lY7zXV7lrV2EeuL6fx9/hh2M7/C8qh7xisFOYqCZOL0q5VBLnjSfzaieDNdKgCJqA== X-Received: by 2002:a17:902:c38b:: with SMTP id g11mr10552697plg.295.1587754942219; Fri, 24 Apr 2020 12:02:22 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id b24sm6421504pfd.175.2020.04.24.12.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Apr 2020 12:02:21 -0700 (PDT) Date: Fri, 24 Apr 2020 12:02:12 -0700 From: Stephen Hemminger To: Honnappa Nagarahalli Cc: "dev@dpdk.org" , nd Message-ID: <20200424120212.3ff081c8@hermes.lan> In-Reply-To: References: <20200212230810.2837-1-stephen@networkplumber.org> <20200424171536.11535-1-stephen@networkplumber.org> <20200424171536.11535-2-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/4] ring: future proof flag settings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Fri, 24 Apr 2020 18:07:15 +0000 Honnappa Nagarahalli wrote: > > > > > > All API's should check that they support the flag values passed. > > These checks ensure that the extra bits can safely be used without risk of ABI > > breakage. > > > > Signed-off-by: Stephen Hemminger > > --- > > lib/librte_ring/rte_ring.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c index > > ebe5ccf0de68..70685121581f 100644 > > --- a/lib/librte_ring/rte_ring.c > > +++ b/lib/librte_ring/rte_ring.c > > @@ -42,6 +42,9 @@ static struct rte_tailq_elem rte_ring_tailq = { }; > > EAL_REGISTER_TAILQ(rte_ring_tailq) > > > > +/* mask of all valid flag values to ring_create() */ > > +#define RING_F_MASK 0x007F > Is it better to construct this using the actual flag #defines? sure, but it gets long