[dpdk-users] Why not extand tab into space in dpdk's coding style?

Gaëtan Rivet gaetan.rivet at 6wind.com
Fri Jun 9 12:15:26 CEST 2017


Hi Sam,

On Fri, Jun 09, 2017 at 06:03:07PM +0800, Sam wrote:
> Now coding in dpdk, I find that lots of file use TABs and SPACEs together
> for indentation, mixed !!!
> 
> I don't know if this is due to some one prefer SPACE, others prefer TAB.
> 
> For ovs, its coding style restrict to use TAB to extand SPACE, why dpdk
> don't like this?

The coding style for DPDK is explained in [1]. Indentation is explained
in [2]. It is pretty close to LKCS.

For hard tabs / space mixes, usually this is the result of the proper
indentation not being modulo 8, the length of the tab. In this case, you
have to indent as much as possible with hard tabs and complete with
spaces.

There may be errors in coding style as it has not always been strictly
enforced, and some maintainers are less stringent on this, but the
choice has been made a long time ago and it is for using tabs.

[1]: http://dpdk.org/doc/guides/contributing/coding_style.html
[2]: http://dpdk.org/doc/guides/contributing/coding_style.html#c-indentation

Cheers,
-- 
Gaëtan Rivet
6WIND


More information about the users mailing list