On Wed, Feb 02, 2022 at 07:54:58AM -0800, Stephen Hemminger wrote: > On Wed, 2 Feb 2022 09:47:32 +0000 > Sean Morrissey <sean.morris...@intel.com> wrote: > > > These header includes have been flagged by the iwyu_tool > > and removed. > > > > Signed-off-by: Sean Morrissey <sean.morris...@intel.com> > > --- > > 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 <rte_memcpy.h> > > #include <rte_mbuf.h> > > #include <rte_ethdev.h> > > #include <rte_lcore.h> > > 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 <stdint.h> > > -#include <rte_mempool.h> > > -#include <rte_ring.h> > > #include <rte_bpf.h> > > > > #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