Re: [PATCH v5 RFC 1/6] page_pool: frag API support for 32-bit arch with 64-bit DMA

From: Jakub Kicinski
Date: Fri Jul 14 2023 - 13:54:56 EST


On Fri, 14 Jul 2023 20:16:34 +0800 Yunsheng Lin wrote:
> > I should have clarified that "types.h" should also include pure
> > function declarations (and possibly static line wrappers like
> > pure get/set functions which only need locally defined types).
>
> So "types.h" is not supposed/allowed to include any header and
> it can include any function declarations and static line wrappers
> which do not depend on any other header? It means we need to forward
> declaring a lot of 'struct' type for function declarations, right?

Only those used in function prototypes. Pointers in structures
are somewhat special and don't require fwd declaration.

> If it is the case, the "types.h" does not seems to match it's
> naming when we can not really define most of the 'struct' in "types.h",
> such as 'struct page_pool' need to include some header in order to
> have definition of 'struct delayed_work'.

Obviously. And refcount.h, and types.h.

> Similar issue for 'helpers.h', as it will include most of the
> definition of 'struct', which are not really helpers, right?