From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id A54535917 for ; Mon, 27 Oct 2014 22:33:24 +0100 (CET) Received: by mail-wg0-f51.google.com with SMTP id l18so2582wgh.34 for ; Mon, 27 Oct 2014 14:42:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=wFrs/TJL/Kwg5j4DzwPu4k6PMYLka17Dp8at7Cv9Q4k=; b=WM1uzw4QZuygtCPlLSvPSH4wHUqRNT0eJ39aWTO/xRY35d8xbgKqwjkLdjRGZrjCWI sfDAoDrx0zKDhbfKHr2ZWyCe6cvvqgS9I+B4N6JCg6SagAzZKCGNez9l9IDrkw7LkFqb b9BRVBzn0YUY+yvhAjF0oHzc95+fHEbe49tmSd1omJ/otO+ltxmyn7K3LOEtthSKgn+U 5SMWZ4OZGr/Pxz41xMopS2UjwL8H8LNoiEep5tB0C3BoQxZRg6dMkqyk0TOiPMH4jEJm ZG4QuWrIjqhuemjx5Gz/HkBAF/ZrAGxCdC90nxAUARNgg3Pkee/uJ5jQ9kkeVumXdnxd 06aw== X-Gm-Message-State: ALoCoQntilI/Vd9n3uckS+NLT/73jTfYhD7lyj9cngJbnzHrz9tbfLfrCpABctrlQjCTgW5IR+sX X-Received: by 10.194.100.98 with SMTP id ex2mr24517723wjb.48.1414446128960; Mon, 27 Oct 2014 14:42:08 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id u2sm16946588wjz.11.2014.10.27.14.42.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Oct 2014 14:42:08 -0700 (PDT) From: Thomas Monjalon To: Matthew Hall Date: Mon, 27 Oct 2014 22:41:50 +0100 Message-ID: <14734459.GQrgyakFfW@xps13> Organization: 6WIND User-Agent: KMail/4.14.2 (Linux/3.17.1-1-ARCH; KDE/4.14.2; x86_64; ; ) In-Reply-To: <20141027202108.GA13632@mhcomputing.net> References: <1411634427-746-1-git-send-email-helin.zhang@intel.com> <3244726.9ZMZU6PFm1@xps13> <20141027202108.GA13632@mhcomputing.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3 3/8] i40e: support of setting hash lookup table size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2014 21:33:25 -0000 2014-10-27 13:21, Matthew Hall: > On Mon, Oct 27, 2014 at 03:13:39PM +0100, Thomas Monjalon wrote: > > You didn't answer to my previous comment on this. > > I think these definitions are useless. 64 is 64. > > Putting labels on the constants gives meaning to them as well as a numeric > value. Not doing so is an antipattern referred to as "magic numbers" > antipattern. Are you kidding Matthew? I'm referring to these constants: > +#define ETH_RSS_RETA_SIZE_64 64 > +#define ETH_RSS_RETA_SIZE_128 128 > +#define ETH_RSS_RETA_SIZE_512 512 It's not RETA_SIZE which would have a meaning but RETA_SIZE_64. We could also define RETA_SIZE_32 or RETA_SIZE_33... > A maintainence programmer or community member will have a difficult time > figuring out lost context when grepping through the code. > > Matthew.