summaryrefslogtreecommitdiffstats
path: root/doc/guides/contributing/coding_style.rst
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-11-27 10:44:39 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2018-11-27 10:45:47 +0000
commita4f0fa29488e582ab8b5ef9db475b3d26ded690c (patch)
treede163f35a726d518a3f93ab6ee4ac25b8982635d /doc/guides/contributing/coding_style.rst
parent29058550643267a554e0368806dece63b047c5cb (diff)
New upstream version 18.11upstream/18.11upstream
Change-Id: I6c63198045de1e34fda8a7b4665d89d5f4a20d20 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'doc/guides/contributing/coding_style.rst')
-rw-r--r--doc/guides/contributing/coding_style.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index 19445c11..d96698a7 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -247,6 +247,15 @@ Structure Declarations
* Use of the structures should be by separate variable declarations and those declarations must be extern if they are declared in a header file.
* Externally visible structure definitions should have the structure name prefixed by ``rte_`` to avoid namespace collisions.
+.. note::
+
+ Uses of ``bool`` in structures are not preferred as is wastes space and
+ it's also not clear as to what type size the bool is. A preferred use of
+ ``bool`` is mainly as a return type from functions that return true/false,
+ and maybe local variable functions.
+
+ Ref: `LKML <https://lkml.org/lkml/2017/11/21/384>`_
+
Queues
~~~~~~