Re: [PATCH v3 18/26] page_pool: Allow page_pool_recycle_direct() to take a netmem or a page

From
Jesper Dangaard Brouer <hidden>
Date
2023-01-12 08:45:27
Also in
linux-mm, llvm, oe-kbuild-all
Reply to
Matthew Wilcox, 2023-01-11
On 11/01/2023 14.43, Matthew Wilcox wrote:
quoted hunk ↗ jump to hunk
On Wed, Jan 11, 2023 at 08:48:30PM +0800, kernel test robot wrote:
quoted
quoted
quoted
drivers/net/ethernet/broadcom/bnxt/bnxt.c:2978:4: error: controlling expression type 'void *' not compatible with any generic association type
                            page_pool_recycle_direct(rxr->page_pool, data);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I swear I did an allmodconfig build ... don't know how I missed this
one.  I think I'll make the page_pool_recycle_direct() macro accept
void * as well, and treat it as a page.  Once we finish the conversion
to netmem, this problem will go away.

ie this:
+++ b/include/net/page_pool.h
@@ -485,7 +485,8 @@ static inline void __page_pool_recycle_page_direct(struct page_pool *pool,
  
  #define page_pool_recycle_direct(pool, mem)    _Generic((mem),         \
         struct netmem *: __page_pool_recycle_direct(pool, (struct netmem *)mem),                \
-       struct page *:   __page_pool_recycle_page_direct(pool, (struct page *)mem))
+       struct page *:   __page_pool_recycle_page_direct(pool, (struct page *)mem),     \
+       void *:  __page_pool_recycle_page_direct(pool, (struct page *)mem))
  
I'm okay with this change, and you can add my acked by.

Acked-by: Jesper Dangaard Brouer <redacted>

Maybe broadcom/bnxt driver should (later) be converted to not use void
pointers... cc. Andy.

--Jesper
Thread (41 messages) 41 messages, 5 authors, last reply 2023-01-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help