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 D33CDA00C5; Wed, 2 Feb 2022 17:00:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46BE8410DC; Wed, 2 Feb 2022 17:00:46 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 834D440E28 for ; Wed, 2 Feb 2022 17:00:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643817644; x=1675353644; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=D0wvncOr+O2V2OiODwubvEhnt7uqv1FCOjODvokLGrA=; b=c258mHZj7qeb8HLsPNYoWEye3fTz7JwiBBS0xvpuQ9Xr0ji+2RsxTSHT gM0i7NmIt5sXYtT/TwNeWH3BKowjbYwVd72YFFCPBbvAaLCd/9DzpHi4i ln8xh5VPWtW7+WzmsGHYdC89gFtMgVMo+Spv8AyzwYtflWwJfVm2EykpF lzT/Y4HYutKZBPiZ2oL/TxA89xQQ9EeTSx6ncXQrNa1AbX7km/vwjjJvj i+U07ZdcaIdlQC/PDp6lWrAUS30QouFBJssOi3cVIQHFK8PRrgjJHrjon kqaWXaiSJzkmOIB/cK5RP1rcVJNokIGceNIHS+CT+/TdTs24QvtPjcwxq Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10246"; a="311254427" X-IronPort-AV: E=Sophos;i="5.88,337,1635231600"; d="scan'208";a="311254427" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2022 08:00:42 -0800 X-IronPort-AV: E=Sophos;i="5.88,337,1635231600"; d="scan'208";a="497786754" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.31.254]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 02 Feb 2022 08:00:41 -0800 Date: Wed, 2 Feb 2022 16:00:38 +0000 From: Bruce Richardson To: Stephen Hemminger Cc: Sean Morrissey , Reshma Pattan , dev@dpdk.org Subject: Re: [PATCH v6 20/50] pdump: remove unneeded header includes Message-ID: References: <20220117201943.873922-1-sean.morrissey@intel.com> <20220202094802.3618978-1-sean.morrissey@intel.com> <20220202094802.3618978-21-sean.morrissey@intel.com> <20220202075458.3f8cd2c1@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220202075458.3f8cd2c1@hermes.local> 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 On Wed, Feb 02, 2022 at 07:54:58AM -0800, Stephen Hemminger wrote: > On Wed, 2 Feb 2022 09:47:32 +0000 > Sean Morrissey wrote: > > > These header includes have been flagged by the iwyu_tool > > and removed. > > > > Signed-off-by: Sean Morrissey > > --- > > lib/pdump/rte_pdump.c | 1 - > > lib/pdump/rte_pdump.h | 2 -- > > 2 files changed, 3 deletions(-) > > > > diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c > > index af450695ec..b3a62df591 100644 > > --- a/lib/pdump/rte_pdump.c > > +++ b/lib/pdump/rte_pdump.c > > @@ -2,7 +2,6 @@ > > * Copyright(c) 2016-2018 Intel Corporation > > */ > > > > -#include > > #include > > #include > > #include > > Yes, this code doesn't use rte_memcpy so yes, remove it. > > > diff --git a/lib/pdump/rte_pdump.h b/lib/pdump/rte_pdump.h > > index 6efa0274f2..41c4b7800b 100644 > > --- a/lib/pdump/rte_pdump.h > > +++ b/lib/pdump/rte_pdump.h > > @@ -13,8 +13,6 @@ > > */ > > > > #include > > -#include > > -#include > > #include > > > > #ifdef __cplusplus > > This header does use rte_mempool and rte_ring in rte_pdump_enable(). > Not sure why IWYU thinks they should be removed. Because they are only used as pointer types, not as structures themselves. Normally in cases like this, I would put in just "struct rte_mempool;" at the top of the file rather than including a whole header just for one structure. > Since this is an API header, changing it here risks breaking an application. > Good point. Should we avoid removing headers from public headers in case of application breakage? It's safer, but it means that we will likely still be including far too many headers in multiple places. If we do remove them, it would not be an ABI break, just an API one, of sorts. /Bruce