From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9E17CA0C4D; Mon, 4 Oct 2021 20:11:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D6BB412B3; Mon, 4 Oct 2021 20:11:49 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 825F540688 for ; Mon, 4 Oct 2021 20:11:47 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10127"; a="311737707" X-IronPort-AV: E=Sophos;i="5.85,346,1624345200"; d="scan'208";a="311737707" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2021 09:34:05 -0700 X-IronPort-AV: E=Sophos;i="5.85,346,1624345200"; d="scan'208";a="544388135" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.10.232]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 04 Oct 2021 09:34:03 -0700 Date: Mon, 4 Oct 2021 17:34:00 +0100 From: Bruce Richardson To: Stephen Hemminger Cc: Sean Morrissey , dev@dpdk.org Message-ID: References: <20211004101058.2396458-1-sean.morrissey@intel.com> <20211004085535.2a56e0b1@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211004085535.2a56e0b1@hermes.local> Subject: Re: [dpdk-dev] [PATCH v1 0/5] introduce IWYU X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Oct 04, 2021 at 08:55:35AM -0700, Stephen Hemminger wrote: > On Mon, 4 Oct 2021 10:10:53 +0000 > Sean Morrissey wrote: > > > This patchset introduces the include-what-you-use script which removes > > unused header includes. IWYU GitHub: > > > > https://github.com/include-what-you-use/include-what-you-use > > > > Along with the script there are some patches which make a start on > > removing unneeded headers. > > > > Sean Morrissey (5): > > devtools: script to remove unused headers includes > > lib/telemetry: remove unneeded header includes > > lib/ring: remove unneeded header includes > > lib/kvargs: remove unneeded header includes > > lib/eal: remove unneeded header includes > > > > devtools/process_iwyu.py | 109 +++++++++++++++++++++++++ > > 49 files changed, 110 insertions(+), 213 deletions(-) > > create mode 100755 devtools/process_iwyu.py > > > > There is a risk of breaking builds on other platforms. > How can you be sure the include files (especially auto generated list) > are the same in Linux, FreeBSD and Windows as well as the special > versions of libc (musl etc). Yep, there is a risk of that but: a) that's why we have automated build checks of various types in test-meson-builds and why we have automated testing of patches in a number of different labs reported out in patchwork. b) if we say we can't risk it, we then can't gain much/any real benefit from tools like iwyu - a tool that you have encouraged use of a number of times :-). Overall, I think this is a good thing for DPDK, and I encouraged Sean to look into it, because it just helps with code quality in DPDK. However, it's also true that there is risk in this, so I think the approach of only doing a few libraries initially - so we can see how it works out - is probably best, rather than trying to do the whole codebase in one go. I think it's also true to say that the risk is greatest with EAL, so if it can be cleaned up, cleaning the other libs and maybe then drivers should be easier. Having the whole processing automated will also help with this, as - if we want to minimize risk - the work on each driver can be done by the driver maintainers themselves, who are best placed to know the platform-specific issues for that code. Regards, /Bruce