From: Stefano Brivio <sbrivio@redhat.com>
To: Peter Foley <pefoley@google.com>
Cc: passt-dev@passt.top, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] Add missing includes to headers
Date: Tue, 24 Feb 2026 00:00:54 +0100 (CET) [thread overview]
Message-ID: <20260224000050.0dc12abc@elisabeth> (raw)
In-Reply-To: <CAAAKUPPS8_7gJ1T677djyWJ8WbKSoijKsuM8J1cgLLD5HDPXgw@mail.gmail.com>
On Mon, 23 Feb 2026 16:37:54 -0500
Peter Foley <pefoley@google.com> wrote:
> On Mon, Feb 23, 2026 at 3:47 PM Stefano Brivio <sbrivio@redhat.com> wrote:
>
> > By the way, I won't have a chance to try this before a couple of days,
> > if needed, but another thought: if we end up adding/changing hundreds
> > of include lines as a result, maybe the cleanup David mentioned would
> > actually be in scope at that point, even from a mere perspective of
> > "noise" we would add, or effort you're spending anyway (let's make it
> > fully worth it I'd say).
>
> I tried running clang-include-cleaner and then massaging it to not include
> c++ only headers or stuff from bits/
> That wound up with:
> 64 files changed, 349 insertions(+), 189 deletions(-)
>
> Unfortunatly include-cleaner isn't smart enough to handle things like
> #include <sys/socket.h> instead of <bits/sockaddr.h>
> So absent adding pragma annotations to glibc headers, I'm not sure a clean
> clang-include-cleaner check is possible.
We could always add suppressions for clang-tidy checks, we already have
a bunch, see NOLINTNEXTLINE directives in the code.
> That diff is
> https://github.com/pefoley2/passt/commit/6ae0bcb2bbdc10384346dda547db60f80c8a9676
> .
> I can send it as a proper patch as well if you're interested, but it's a
> lot of churn and I'm not sure how to prevent back-sliding...
Ouch... yeah.
Let me have another look tomorrow (Tuesday) but I think it only makes
sense if we use that as a chance to entirely switch to approach #2
David was mentioning (minus perhaps some exceptions), including all
the related clean-ups.
I'm totally for it by the way, if you can take care of it. Otherwise
I'd recommend sticking to a more conservative approach for the moment
being.
--
Stefano
next prev parent reply other threads:[~2026-02-23 23:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 17:45 Peter Foley
2026-02-21 17:57 ` Stefano Brivio
[not found] ` <CAAAKUPN=GPDp84tQAv4Kpxs-AzKR44pDkWda-AbXWaUomYN5eg@mail.gmail.com>
[not found] ` <CAAAKUPMP8goRHqk0VDn6UDWmyyPXpzs37UuCLL8x7wDp10tY6A@mail.gmail.com>
2026-02-23 17:35 ` Stefano Brivio
[not found] ` <CAAAKUPMQZetb9RYoxaUZGyp7dWm8pifmvEfyV3M4Q6+j9jw89g@mail.gmail.com>
2026-02-23 18:11 ` [PATCH v2] " Peter Foley
2026-02-23 19:05 ` [PATCH] " Stefano Brivio
[not found] ` <CAAAKUPMRYcbeTXZHX9aQtZfv4L=sBbzqSWqo-xG91F6r7f8M1w@mail.gmail.com>
2026-02-23 20:47 ` Stefano Brivio
[not found] ` <CAAAKUPPS8_7gJ1T677djyWJ8WbKSoijKsuM8J1cgLLD5HDPXgw@mail.gmail.com>
2026-02-23 23:00 ` Stefano Brivio [this message]
2026-02-23 5:33 ` David Gibson
2026-02-23 16:32 ` Stefano Brivio
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=20260224000050.0dc12abc@elisabeth \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=pefoley@google.com \
/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.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
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 IMAP folder(s).