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

From: Yunsheng Lin
Date: Mon Jul 17 2023 - 08:33:13 EST


On 2023/7/15 1:52, Jakub Kicinski wrote:
> 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.

I gave it a try to split it, and something as below come out:

https://github.com/gestionlin/linux/commit/11ac8c1959f7eda06a7b987903f37212b490b292

As the 'helpers.h' is not really useful when splitting, so only
'page_pool_types.h' is added, and include 'page_pool_types.h' in
'page_pool.h', does it make sense?

As Alexander is sending a new RFC for the similar problem, I think
we need to align on which is the better way to solve the problem.