[dpdk-dev] [PATCHv5 1/8] ethdev: add new API to retrieve RX/TX queue information

Bruce Richardson bruce.richardson at intel.com
Fri Oct 16 15:16:38 CEST 2015


On Wed, Oct 14, 2015 at 06:44:38PM +0000, Ananyev, Konstantin wrote:
> 
> 
> > -----Original Message-----
> > From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> > Sent: Wednesday, October 14, 2015 5:09 PM
> > To: Ananyev, Konstantin
> > Cc: dev at dpdk.org
> > Subject: Re: [dpdk-dev] [PATCHv5 1/8] ethdev: add new API to retrieve RX/TX queue information
> > 
> > On Thu,  1 Oct 2015 20:54:46 +0100
> > Konstantin Ananyev <konstantin.ananyev at intel.com> wrote:
> > 
> > > +	if (nb_rx_desc > dev_info.rx_desc_lim.nb_max ||
> > > +			nb_rx_desc < dev_info.rx_desc_lim.nb_min ||
> > > +			nb_rx_desc % dev_info.rx_desc_lim.nb_align != 0) {
> > > +
> > 
> > Preferred indentation style is to line up the conditional.
> > 	if (nb_rx_desc > dev_info.rx_desc_lim.nb_max ||
> > 	    nb_rx_desc < dev_info.rx_desc_lim.nb_min ||
> > 	    nb_rx_desc % dev_info.rx_desc_lim.nb_align != 0) {
> 
> 
> As I remember within DPDK we use an extra tab as preferred indentation style for several years.
> Why it suddenly changed now?
> Konstantin
>
We actually have a mix of styles, some using double-indent on continuation, and
some using aligning as above. I prefer the double indent, as I don't like mixing
tabs and spaces for indentation and the resulting line-up of lines for those poor
souls using 4-char tabs, but overall, the global rule is to try and copy the
existing style in the file being modified. There are already instances of
this style of indent in ethdev.c [I checked, which is why I didn't object myself
to Stephen's comment :-)]

/Bruce


More information about the dev mailing list