From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 7/8] ethdev: support of multiple sizes of redirection table Date: Fri, 31 Oct 2014 09:46:25 +0100 Message-ID: <1805380.mAoYbZuahn@xps13> References: <1411634427-746-1-git-send-email-helin.zhang@intel.com> <1959774.p5xijEU5zU@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: "Zhang, Helin" Return-path: In-Reply-To: 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-31 01:39, Zhang, Helin: > From: Thomas Monjalon [mailto:thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org] > > 2014-10-28 00:37, Zhang, Helin: > > > From: Thomas Monjalon [mailto:thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org] > > > > 2014-10-22 19:53, Helin Zhang: > > > > > +#define RTE_BIT_WIDTH_64 (CHAR_BIT * sizeof(uint64_t)) > > > > > > > > How can it be different of 64? > > > > Using 64 would be simpler to understand than RTE_BIT_WIDTH_64. > > > > > > > > > + uint8_t reta[RTE_BIT_WIDTH_64]; /**< 64 redirection table entries. */ > > > We always try to use macro in code to replace numeric, this can get the numeric > > more understandable. > > > > How bit width 64 is more understandable than 64? > > Especially when you count a number of entries, not a bit width. > > RETA_ENTRIES_MAX would be more understandable. > > Renaming the macro is needed. I plan to rename it to RTE_RETA_GROUP_SIZE, > as it is a group of 64 reta entries, but not the maximum number of valid entries. OK, good. -- Thomas