On Sun, May 5, 2024 at 7:18 PM Stephen Hemminger <step...@networkplumber.org>
wrote:

> On Sat,  4 May 2024 19:18:37 +0000
> Abdullah Ömer Yamaç <aomerya...@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ç <aomerya...@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 */
>

Reply via email to