From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202602 header.b=ME/bhP+9; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 277025A0265 for ; Tue, 24 Feb 2026 06:44:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1771911887; bh=78/1ZQPxm4b4D7mWxm61caP0rCJLC1VPmzZ4pwex4yM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ME/bhP+97o07iZV///FKFr52l/efvaZmZdg5wwH74KP/wwcMlBQib6CjB/GILzQ7J Emk+ABi5PgmO+vcx1I5Xw2Nr+eg3uxpwj2vBn9PJpGCFV3hd64EyAkF+bLogdt8GWJ +Q4MTJOwIzeV0y1mkMQrNhTTrDLK/jN6UzGWgtyYCfzpCDOzEd3FXdjr0JGOOzH4o4 BMmxix9OATnPUVvve+JjAppR/eIIovyTfIlB9as4sTOtGJYaooCwWfk67z5Wgu19vK hlRHNunRCfwLwtl1o+MeoTt6Vc7mNNmwpU/hSuiTGByKdohnzIu2GiD75hEVoQoKg3 fCOnH5/rDLJrw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4fKmrb3xCfz4w11; Tue, 24 Feb 2026 16:44:47 +1100 (AEDT) Date: Tue, 24 Feb 2026 16:43:13 +1100 From: David Gibson To: Peter Foley Subject: Re: [PATCH] Add missing includes to headers Message-ID: References: <20260219184454.1501389-1-pefoley@google.com> <20260221185706.6bb0ade2@elisabeth> <20260223183530.2c040c94@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="S5gHEh+xfkP4ygKV" Content-Disposition: inline In-Reply-To: Message-ID-Hash: LV54KPIGQIQIJPXK4GJC3Z3SFSRM7EQQ X-Message-ID-Hash: LV54KPIGQIQIJPXK4GJC3Z3SFSRM7EQQ X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Stefano Brivio , passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --S5gHEh+xfkP4ygKV Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 23, 2026 at 01:08:07PM -0500, Peter Foley wrote: > On Mon, Feb 23, 2026 at 12:35=E2=80=AFPM Stefano Brivio wrote: >=20 > > By the way, we already run clang-tidy tests ('make clang-tidy') as part > > of our tests (test/build/static_checkers.sh). > > > > Would it be just a matter of enabling the misc-include-cleaner in the > > list of tests we give clang-tidy from the Makefile: > > > > https://clang.llvm.org/extra/clang-tidy/checks/misc/include-cleaner.h= tml > > > > ? I haven't tried. > > >=20 > It appears so, a local change to pass -checks=3Dmisc-include-cleaner to > clang-tidy resulted in a ton of errors like: > /usr/local/google/home/pefoley/passt/vu_common.c:277:2: error: no header > providing "iov_from_buf" is directly included > [misc-include-cleaner,-warnings-as-errors] > 277 | iov_from_buf(in_sg, elem_cnt, VNET_HLEN, buf, total); > | ^ > /usr/local/google/home/pefoley/passt/vu_common.c:301:15: error: no header > providing "ETH_ZLEN" is directly included > [misc-include-cleaner,-warnings-as-errors] > 9 | if (l2len >=3D ETH_ZLEN) > | ^ > /usr/local/google/home/pefoley/passt/vu_common.c:304:2: error: no header > providing "memset" is directly included > [misc-include-cleaner,-warnings-as-errors] > 9 | memset((char *)iov->iov_base + iov->iov_len, 0, ETH_ZLEN - > l2len); Unfortunately, I suspect this isn't going to work out. It may do some of the checks we want here, but unfortunately it makes some very silly warnings in relation to the standard library, which is why we disabled it in the first place. See commit 3be9e0010ea7329ae0f3707f67ac4cf0bac13d54 I guess we should retry and see if the latest LLVM is better about this, though. >=20 >=20 > > > > > If you want, I can fold the two "include fixing" commits together and > > > re-send. > > > > Yes, thanks, that would be appreciated. I would first try to settle on > > a convenient way to keep Blaze/Bazel happy for the future, though. > > >=20 > As I mentioned earlies, Bazel appears to be happy withough the include > fixes, it's just Google's internal Blaze varient that has some kind of > stricter checking that falls over. > I can send the change out for supporting the Bazel build, but I think usi= ng > misc-include-cleaner would be a better plan. >=20 >=20 > > > > -- > > Stefano > > > > --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --S5gHEh+xfkP4ygKV Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmmdOmUACgkQzQJF27ox 2GcWEw//d4Yc8cAn40sjXwWJ9bS4tCVopGNjgh7zxEF90Ra5xAwLGE1zQHjpAy/Z /OW5VIjsdEW5GKZO8/ZRkyB2usjaz4aegDgsH95wQ8Nm5wSJnCVZC0eS653YnwCc uB0lxpWqXgj7Pqpky/+hL9MZrfMH5I5EkJpCozrr9WZdg9X1afeDpc3EclNaBZkT JJRFre1TosAGwZOv7IsgDmrkLO/sNeZcXEl50Y0PGE4wqxyhWHwYeEvL/HHFXmod ZaAwujuY5gflke3EfPhFAbflsRwD6b8L02pZob8abOLW3Lmz6QJIEaGZdIMNRxHx 4fMDSIkg7uqhaqLYFlaZIKwcT7ZB/LJUXA/Kgujc/NDlKdI8a1kItXC20jBSyxFR 90BhL2zkjvrIBc4l+xzlehnZKNG7mq6GOfYcMmsu/jGv6ZqY/vV9VehRrsaNz0nX 2ptIJmjSVlEDMualHXvYemtLsZ0qGXUXWZ1UStXAJDChhJXGkAMzft49LhgOu5mp Ik3nQNd2zaRh5mq0dR82tGU/w77EWutX8a9rQI0WVRrtj/nYk9u1m4kKY3q/fgbe bbQXWHhAWZhoB6zjK3oE0yEgSwbmXFAp6OC33KUGsMmsPgUgSjdiayuNECcX/gsN AKbjqs7Laqzqpz7kXNgfdsq09cZGegHPoOApU0b40JY5kG/Ej24= =IvDf -----END PGP SIGNATURE----- --S5gHEh+xfkP4ygKV--