@@ -893,11 +893,6 @@ static void skb_clone_fraglist(struct sk_buff *skb)
893
893
skb_get (list );
894
894
}
895
895
896
- static bool is_pp_netmem (netmem_ref netmem )
897
- {
898
- return (netmem_get_pp_magic (netmem ) & ~0x3UL ) == PP_SIGNATURE ;
899
- }
900
-
901
896
int skb_pp_cow_data (struct page_pool * pool , struct sk_buff * * pskb ,
902
897
unsigned int headroom )
903
898
{
@@ -995,14 +990,7 @@ bool napi_pp_put_page(netmem_ref netmem)
995
990
{
996
991
netmem = netmem_compound_head (netmem );
997
992
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 )))
1006
994
return false;
1007
995
1008
996
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)
1042
1030
1043
1031
for (i = 0 ; i < shinfo -> nr_frags ; i ++ ) {
1044
1032
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 )))
1046
1034
page_pool_ref_netmem (head_netmem );
1047
1035
else
1048
1036
page_ref_inc (netmem_to_page (head_netmem ));
0 commit comments