From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 3/8] i40e: support of setting hash lookup table size Date: Mon, 27 Oct 2014 22:41:50 +0100 Message-ID: <14734459.GQrgyakFfW@xps13> References: <1411634427-746-1-git-send-email-helin.zhang@intel.com> <3244726.9ZMZU6PFm1@xps13> <20141027202108.GA13632@mhcomputing.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Matthew Hall Return-path: In-Reply-To: <20141027202108.GA13632-Hv3ogNYU3JfZZajBQzqCxQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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.