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: Wed, 29 Oct 2014 11:00:11 +0100 Message-ID: <3930995.vElmohEEnC@xps13> References: <1411634427-746-1-git-send-email-helin.zhang@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-29 08:24, Zhang, Helin: > > > -----Original Message----- > > From: Zhang, Helin > > Sent: Tuesday, October 28, 2014 8:01 PM > > To: Thomas Monjalon > > Cc: dev-VfR2kkLFssw@public.gmane.org > > Subject: RE: [dpdk-dev] [PATCH v2 04/13] ethdev: support of multiple sizes of > > redirection table > > > > Hi Thomas > > > > > -----Original Message----- > > > From: Thomas Monjalon [mailto:thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org] > > > Sent: Tuesday, October 28, 2014 6:10 PM > > > To: Zhang, Helin > > > Cc: dev-VfR2kkLFssw@public.gmane.org > > > Subject: Re: [dpdk-dev] [PATCH v2 04/13] ethdev: support of multiple > > > sizes of redirection table > > > > > > 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. > > > > > > OK, so you should explain that only these values are allowed. > > > In general, it's something we explain in the comment of the function > > It would be better to add comments for the functions. > Now do not think explain what value is allowed for the functions in ethdev layer, > as it might be hardware specific. > I think the best way is to comment out end users can get the reta size by > 'dev_infos_get' on each port, rather than telling the values directly. Yes, it's better. Thanks -- Thomas