[PATCH v3] devtools: add .clang-format file
Abdullah Ömer Yamaç
aomeryamac at gmail.com
Sun May 5 20:43:48 CEST 2024
On Sun, May 5, 2024 at 7:18 PM Stephen Hemminger <stephen at networkplumber.org>
wrote:
> On Sat, 4 May 2024 19:18:37 +0000
> Abdullah Ömer Yamaç <aomeryamac at gmail.com> wrote:
>
> > clang-format is a tool to format C/C++/Objective-C code. It can be used
> > to reformat code to match a given coding style, or to ensure that code
> > adheres to a specific coding style. It helps to maintain a consistent
> > coding style across the DPDK codebase.
> >
> > .clang-format file overrides the default style options provided by
> > clang-format and large set of IDEs and text editors support it.
> >
> > Signed-off-by: Abdullah Ömer Yamaç <aomeryamac at gmail.com>
> > ---
> > .clang-format | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 138 insertions(+)
> > create mode 100644 .clang-format
>
> Tried this, but it needs some change to how braces at start of function
> are handled. For example, this is not how DPDK should look:
>
Are the changes below ok? When I fix these cases, some macros are also
formatted in the same manner.
-#define RTE_RX_OFFLOAD_BIT2STR(_name) \
- { RTE_ETH_RX_OFFLOAD_##_name, #_name }
+#define RTE_RX_OFFLOAD_BIT2STR(_name) \
+ { \
+ RTE_ETH_RX_OFFLOAD_##_name, #_name \
+ }
>
> static int
> -rte_pmd_tap_remove(struct rte_vdev_device *dev)
> -{
> +rte_pmd_tap_remove(struct rte_vdev_device *dev) {
> struct rte_eth_dev *eth_dev = NULL;
>
> /* find the ethdev entry */
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20240505/237a0cef/attachment.htm>
More information about the dev
mailing list