<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 5, 2024 at 7:18 PM Stephen Hemminger <<a href="mailto:stephen@networkplumber.org">stephen@networkplumber.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat,  4 May 2024 19:18:37 +0000<br>
Abdullah Ömer Yamaç <<a href="mailto:aomeryamac@gmail.com" target="_blank">aomeryamac@gmail.com</a>> wrote:<br>
<br>
> clang-format is a tool to format C/C++/Objective-C code. It can be used<br>
> to reformat code to match a given coding style, or to ensure that code<br>
> adheres to a specific coding style. It helps to maintain a consistent<br>
> coding style across the DPDK codebase.<br>
> <br>
> .clang-format file overrides the default style options provided by<br>
> clang-format and large set of IDEs and text editors support it.<br>
> <br>
> Signed-off-by: Abdullah Ömer Yamaç <<a href="mailto:aomeryamac@gmail.com" target="_blank">aomeryamac@gmail.com</a>><br>
> ---<br>
>  .clang-format | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++<br>
>  1 file changed, 138 insertions(+)<br>
>  create mode 100644 .clang-format<br>
<br>
Tried this, but it needs some change to how braces at start of function<br>
are handled.  For example, this is not how DPDK should look:<br></blockquote><div>Are the changes below ok? When I fix these cases, some macros are also formatted in the same manner.<br><br>-#define RTE_RX_OFFLOAD_BIT2STR(_name)     \<br>-    { RTE_ETH_RX_OFFLOAD_##_name, #_name }<br>+#define RTE_RX_OFFLOAD_BIT2STR(_name)              \<br>+ {                                          \<br>+            RTE_ETH_RX_OFFLOAD_##_name, #_name \<br>+ }<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
 static int<br>
-rte_pmd_tap_remove(struct rte_vdev_device *dev)<br>
-{<br>
+rte_pmd_tap_remove(struct rte_vdev_device *dev) {<br>
        struct rte_eth_dev *eth_dev = NULL;<br>
<br>
        /* find the ethdev entry */<br>
</blockquote></div></div>