From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 04/13] ethdev: support of multiple sizes of redirection table Date: Tue, 28 Oct 2014 15:22:46 +0100 Message-ID: <16840005.4l2yIG62TI@xps13> References: <1411634427-746-1-git-send-email-helin.zhang@intel.com> <59AF69C657FD0841A61C55336867B5B034434191@IRSMSX103.ger.corp.intel.com> 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-28 13:20, Zhang, Helin: > From: Richardson, Bruce > > From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Thomas Monjalon > > > 2014-10-28 00:33, Zhang, Helin: > > > > From: Thomas Monjalon [mailto:thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org] > > > > > 2014-09-25 16:40, Helin Zhang: > > > > > > /* Definitions used for redirection table entry size */ > > > > > > -#define ETH_RSS_RETA_NUM_ENTRIES 128 > > > > > > -#define ETH_RSS_RETA_MAX_QUEUE 16 > > > > > > +#define ETH_RSS_RETA_SIZE_64 64 > > > > > > +#define ETH_RSS_RETA_SIZE_128 128 > > > > > > +#define ETH_RSS_RETA_SIZE_512 512 > > > > > > + > > > > > > +#define RTE_BIT_WIDTH_64 (CHAR_BIT * sizeof(uint64_t)) > > > > > > > > > > Are these constants really needed? > > > > > > > > These constants were defined for the third input parameter of > > > > rte_eth_dev_rss_reta_update() and rte_eth_dev_rss_reta_query(). End > > > > users need > > > > to give the correct reta size listed as above, as other values is > > > > not valid. So it would be > > > > better to list the valid reta sizes in macros here. > > > > > If only limited range of values are allowed, would an enum work better than a set > > of macros? > > Good idea! Any other comments for this from other guys? I would prefer the API to be independent of the hardware capabilities. -- Thomas