From: Maxime Leroy <maxime@leroys.fr>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Thomas Monjalon <thomas@monjalon.net>,
David Marchand <david.marchand@redhat.com>,
Maxime Leroy <maxime@leroys.fr>
Subject: [PATCH] doc: drop recommendation against bool in structures
Date: Mon, 20 Jul 2026 13:46:02 +0200 [thread overview]
Message-ID: <20260720114602.787429-1-maxime@leroys.fr> (raw)
The coding style advised against bool in structures, citing space and
type-size concerns inherited from the Linux kernel. That does not match
DPDK practice: bool is already used in over 1400 structure fields across
the tree, including core APIs such as rte_flow. Drop the note so the
style guide reflects actual usage.
Signed-off-by: Maxime Leroy <maxime@leroys.fr>
---
doc/guides/contributing/coding_style.rst | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index 976a1e1de3..11de3bb39a 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -313,15 +313,6 @@ 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::
-
- Avoid using ``bool`` in structures because it wastes space and
- the type size is unclear. 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
~~~~~~
--
2.43.0
next reply other threads:[~2026-07-20 11:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 11:46 Maxime Leroy [this message]
2026-07-20 12:13 ` [PATCH] doc: drop recommendation against bool in structures Bruce Richardson
2026-07-20 12:51 ` Morten Brørup
2026-07-20 12:57 ` Bruce Richardson
2026-07-20 12:59 ` Morten Brørup
2026-07-21 13:17 ` Marat Khalili
2026-07-22 9:44 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260720114602.787429-1-maxime@leroys.fr \
--to=maxime@leroys.fr \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox