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 3D808A317C for ; Thu, 17 Oct 2019 22:39:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7AC401E95B; Thu, 17 Oct 2019 22:39:36 +0200 (CEST) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id 3D1BB1E957 for ; Thu, 17 Oct 2019 22:39:34 +0200 (CEST) Received: by mail-pg1-f193.google.com with SMTP id r1so2000137pgj.12 for ; Thu, 17 Oct 2019 13:39:34 -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=1F6JAdC7lWkHjRfVJFAGoHEz/OHmCyFFw6Oi2i08JFI=; b=BD4FClZXTUZjhl0mIp1+NndLcn2iL9BCyR2BJxFsprzMevRebi4V+BX2flYgbvEum4 DkhI4BhaRs1LEdUpv7cc9mbfLVMIqJOJ29YwhX8eC2b3OK4I2M31uEIXnROYUbu4C7x/ QWqI8YblD13fVaXKsGHtgiplsHVGsCKLcw8zS1Y2ANgghojfSWKkvMk9+bj4dOeWjBUI tUptStKSf5NO5JcBhKMLpFnR/JNADuqGQRDjtbPRwPF4Q1ALrgzYgXSv4MeSZIJf3Amb e+zyyXpCYJMktvX56TYEyz9RuOo9WUKi7ax/URWbA7s3XJ+y7eeKg7EhjA2z2KD+tZT7 xa6A== 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=1F6JAdC7lWkHjRfVJFAGoHEz/OHmCyFFw6Oi2i08JFI=; b=bS0oW+kTIyAdou541Isy4rSu8myRpx9ej7eNn8Zb/0xGubVjoTNB2EVPn2aCNDmWB/ 0b7svFyr/BsP5VmHTHhT6I5CCmEfSJgNV7wvfUZy0SvKcKYvOpukKndPqvuGfcRCN3fv vuT3TUVooCT7nJvc37mMsHSTONGj1MASZGFzoqd8I2TMVx9pa/HeGF9/QxMluac22qOK zlZ+BC7qhKhM0myTM6xVwiXft7KCIUC7sc0GC3W7rQ+zcUAjG07ZoOQ8GZQazxhnvt14 2rWBh/rxVasTUWNRA1L4SXgkrcXtG2tKO2EIJPNPIFnfxjh6Y51b3Q9t2qeaANUqE/5N G7wg== X-Gm-Message-State: APjAAAWQrdo00otjKXo6BuEXRU3L53XnYoNs6Lw5m0/MCwYnm5Zi6xap DCh5eODzzK1NvilrBG15+3s4Fg== X-Google-Smtp-Source: APXvYqylefQZh1qdVhRBFtlzf0kitCeUVNAfLcLSSqBKtDZGSwGwzP835NOpOSPzP+S2jqoBGATHnQ== X-Received: by 2002:a65:67d0:: with SMTP id b16mr6464211pgs.64.1571344773093; Thu, 17 Oct 2019 13:39:33 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 62sm3453699pfg.164.2019.10.17.13.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 13:39:32 -0700 (PDT) Date: Thu, 17 Oct 2019 13:39:23 -0700 From: Stephen Hemminger To: Honnappa Nagarahalli Cc: olivier.matz@6wind.com, sthemmin@microsoft.com, jerinj@marvell.com, bruce.richardson@intel.com, david.marchand@redhat.com, pbhagavatula@marvell.com, konstantin.ananyev@intel.com, drc@linux.vnet.ibm.com, hemant.agrawal@nxp.com, dev@dpdk.org, dharmik.thakkar@arm.com, ruifeng.wang@arm.com, gavin.hu@arm.com Message-ID: <20191017133923.454b72eb@hermes.lan> In-Reply-To: <20191017200807.20772-2-honnappa.nagarahalli@arm.com> References: <20190906190510.11146-1-honnappa.nagarahalli@arm.com> <20191017200807.20772-1-honnappa.nagarahalli@arm.com> <20191017200807.20772-2-honnappa.nagarahalli@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 1/3] lib/ring: apis to support configurable element size 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 Thu, 17 Oct 2019 15:08:05 -0500 Honnappa Nagarahalli wrote: > + if ((esize != 4) && (esize != 8) && (esize != 16)) { > + RTE_LOG(ERR, RING, > + "Unsupported esize value. Supported values are 4, 8 and 16\n"); > + > + return -EINVAL; > + } > + > /* count must be a power of 2 */ > if ((!POWEROF2(count)) || (count > RTE_RING_SZ_MASK )) { Minor nit, you don't need as many parens in conditionals. if (esize != 4 && esize != 8 && esize != 16) { and if (!POWEROF2(count) || count > RTE_RING_SZ_MASK) {