DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Abdullah Ömer Yamaç" <aomeryamac@gmail.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>
Cc: dev@dpdk.org, thomas@monjalon.net
Subject: Re: [PATCH] devtools: add .clang-format file
Date: Wed, 1 May 2024 00:27:00 +0300	[thread overview]
Message-ID: <CA+sj1i9AdA2Og+EcuZfxC6Xanf85b0weoBuLDvjynrLcUsptRw@mail.gmail.com> (raw)
In-Reply-To: <64089d51-ed3c-4383-9014-920d772c9a98@amd.com>

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

> ...
>
> 1. Some options are failing for me [1], I don't know if it requires a
> specific version of clang-format
>
I fixed these errors, and the clang-format version should be 17. I will
send them after some discussions, as I've shared below.

>
> 2. Current options are not fully aligned with coding convention, it is
> easier to see what is not compatible by running the tool on an existing
> file [2].
> we need to fix them.
>
> There are some cases that we need to discuss. First of all, I applied the
latest clang format that I created.
- In default cases for clang-format, include headers are sorted
alphabetically. It improves the readability of code, and it breaks the
codebase. These changes do not affect code maintenance because they are
only headers.
- Second question about the column width. In the definition of
.editorconfig, the column width is set as 100, but the previous commits
violate this. Here is the sample code:
 struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS];
@@ -61,8 +61,7 @@ static const struct rte_eth_xstats_name_off
eth_dev_stats_strings[] = {
        {"rx_missed_errors", offsetof(struct rte_eth_stats, imissed)},
        {"rx_errors", offsetof(struct rte_eth_stats, ierrors)},
        {"tx_errors", offsetof(struct rte_eth_stats, oerrors)},
-       {"rx_mbuf_allocation_errors", offsetof(struct rte_eth_stats,
-               rx_nombuf)},
+       {"rx_mbuf_allocation_errors", offsetof(struct rte_eth_stats,
rx_nombuf)},
 };

We could use this clang-format file only for the new patches and newly
inserted lines. I am using VSCode IDE for development, and after some
modification, I can select the modified lines and apply formatting. It is
very useful for these cases. Otherwise, we need to handle so many things.

By the way, I am still working on macros. If you have any comments on this,
I would be very happy to discuss it.


> ...

[-- Attachment #2: Type: text/html, Size: 2558 bytes --]

      parent reply	other threads:[~2024-04-30 21:27 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 13:04 Abdullah Ömer Yamaç
2024-04-29 13:32 ` Ferruh Yigit
2024-04-29 15:36   ` Stephen Hemminger
2024-04-29 15:43   ` Stephen Hemminger
2024-05-04 13:38     ` Abdullah Ömer Yamaç
2024-05-04 13:41       ` [PATCH v2] " Abdullah Ömer Yamaç
2024-05-04 16:27         ` Stephen Hemminger
2024-05-04 18:18           ` Abdullah Ömer Yamaç
2024-05-04 19:18             ` [PATCH v3] " Abdullah Ömer Yamaç
2024-05-05 16:18               ` Stephen Hemminger
2024-05-05 18:43                 ` Abdullah Ömer Yamaç
2024-05-05 16:20               ` Stephen Hemminger
2024-05-05 19:42                 ` Abdullah Ömer Yamaç
2024-05-05 20:38                   ` Stephen Hemminger
2024-05-06 10:43                     ` Abdullah Ömer Yamaç
2024-05-08 21:19                       ` [PATCH v4] " Abdullah Ömer Yamaç
2024-05-13 13:08                         ` Ferruh Yigit
2024-05-13 15:55                           ` Stephen Hemminger
2024-05-13 19:11                             ` Morten Brørup
2024-05-14  7:56                               ` Bruce Richardson
2024-05-14 16:59                                 ` Tyler Retzlaff
2024-05-15  8:28                           ` Abdullah Ömer Yamaç
2024-05-15  8:43                             ` Bruce Richardson
2024-05-15 10:19                               ` Abdullah Ömer Yamaç
2024-05-15 11:41                                 ` Bruce Richardson
2024-05-15 15:07                               ` Stephen Hemminger
2024-05-15 20:32                                 ` Abdullah Ömer Yamaç
2024-05-16  8:20                                   ` [PATCH v5] " Abdullah Ömer Yamaç
2024-05-17  9:30                                     ` Bruce Richardson
2024-10-07 17:24                                     ` Stephen Hemminger
2024-10-14 22:15                                       ` [PATCH v6] " Abdullah Ömer Yamaç
2024-10-15  3:12                                         ` Stephen Hemminger
2024-10-14 22:16                                       ` Abdullah Ömer Yamaç
2024-04-30 21:27   ` Abdullah Ömer Yamaç [this message]

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=CA+sj1i9AdA2Og+EcuZfxC6Xanf85b0weoBuLDvjynrLcUsptRw@mail.gmail.com \
    --to=aomeryamac@gmail.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --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;
as well as URLs for NNTP newsgroup(s).