Merge tag 'mt76-for-kvalo-2021-01-29' of https://github.com/nbd168/wireless
[linux-2.6-microblaze.git] / drivers / net / ethernet / intel / iavf / iavf_txrx.c
index 256fa07..ffaf274 100644 (file)
@@ -1141,19 +1141,6 @@ static void iavf_reuse_rx_page(struct iavf_ring *rx_ring,
        new_buff->pagecnt_bias  = old_buff->pagecnt_bias;
 }
 
-/**
- * iavf_page_is_reusable - check if any reuse is possible
- * @page: page struct to check
- *
- * A page is not reusable if it was allocated under low memory
- * conditions, or it's not in the same NUMA node as this CPU.
- */
-static inline bool iavf_page_is_reusable(struct page *page)
-{
-       return (page_to_nid(page) == numa_mem_id()) &&
-               !page_is_pfmemalloc(page);
-}
-
 /**
  * iavf_can_reuse_rx_page - Determine if this page can be reused by
  * the adapter for another receive
@@ -1187,7 +1174,7 @@ static bool iavf_can_reuse_rx_page(struct iavf_rx_buffer *rx_buffer)
        struct page *page = rx_buffer->page;
 
        /* Is any reuse possible? */
-       if (unlikely(!iavf_page_is_reusable(page)))
+       if (!dev_page_is_reusable(page))
                return false;
 
 #if (PAGE_SIZE < 8192)