@@ -893,11 +893,6 @@ static void skb_clone_fraglist(struct sk_buff *skb)
893893 skb_get (list );
894894}
895895
896- static bool is_pp_netmem (netmem_ref netmem )
897- {
898- return (netmem_get_pp_magic (netmem ) & ~0x3UL ) == PP_SIGNATURE ;
899- }
900-
901896int skb_pp_cow_data (struct page_pool * pool , struct sk_buff * * pskb ,
902897 unsigned int headroom )
903898{
@@ -995,14 +990,7 @@ bool napi_pp_put_page(netmem_ref netmem)
995990{
996991 netmem = netmem_compound_head (netmem );
997992
998- /* page->pp_magic is OR'ed with PP_SIGNATURE after the allocation
999- * in order to preserve any existing bits, such as bit 0 for the
1000- * head page of compound page and bit 1 for pfmemalloc page, so
1001- * mask those bits for freeing side when doing below checking,
1002- * and page_is_pfmemalloc() is checked in __page_pool_put_page()
1003- * to avoid recycling the pfmemalloc page.
1004- */
1005- if (unlikely (!is_pp_netmem (netmem )))
993+ if (unlikely (!netmem_is_pp (netmem )))
1006994 return false;
1007995
1008996 page_pool_put_full_netmem (netmem_get_pp (netmem ), netmem , false);
@@ -1042,7 +1030,7 @@ static int skb_pp_frag_ref(struct sk_buff *skb)
10421030
10431031 for (i = 0 ; i < shinfo -> nr_frags ; i ++ ) {
10441032 head_netmem = netmem_compound_head (shinfo -> frags [i ].netmem );
1045- if (likely (is_pp_netmem (head_netmem )))
1033+ if (likely (netmem_is_pp (head_netmem )))
10461034 page_pool_ref_netmem (head_netmem );
10471035 else
10481036 page_ref_inc (netmem_to_page (head_netmem ));
0 commit comments