[dpdk-dev] [PATCH v2 03/16] fm10k: Add a new func to initialize all parameters

Chen, Jing D jing.d.chen at intel.com
Fri Oct 23 10:27:37 CEST 2015


Hi, Stephen,

Best Regards,
Mark


> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Thursday, October 22, 2015 11:58 PM
> To: Chen, Jing D
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 03/16] fm10k: Add a new func to initialize
> all parameters
> 
> On Thu, 22 Oct 2015 17:44:51 +0800
> "Chen Jing D(Mark)" <jing.d.chen at intel.com> wrote:
> 
> > +static void
> > +fm10k_params_init(struct rte_eth_dev *dev)
> > +{
> > +	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
> > +	struct fm10k_dev_info *info = FM10K_DEV_PRIVATE_TO_INFO(dev);
> > +	/* Inialize bus info. Normally we would call fm10k_get_bus_info(),
> but
> > +	 * there is no way to get link status without reading BAR4.  Until this
> > +	 * works, assume we have maximum bandwidth.
> > +	 * @todo - fix bus info
> 
> Minor nit. I would prefer that DPDK follow current Linux kernel
> style which is to always have a blank line after declarations.
> This improves readability.
> 

Thanks the comments! I'll change accordingly.

> I.e:
> 
> static void
> fm10k_params_init(struct rte_eth_dev *dev)
> {
> 	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
> 	struct fm10k_dev_info *info = FM10K_DEV_PRIVATE_TO_INFO(dev);
> 
> 	/* Inialize bus info. Normally we would call fm10k_get_bus_info(),
> but
> 	 * there is no way to get link status without reading BAR4.  Until this
> 	 * works, assume we have maximum bandwidth.
> 	 * @todo - fix bus info


More information about the dev mailing list