fm10k/igb/ixgbe: Replace __skb_alloc_page with dev_alloc_page
The Intel drivers were pretty much just using the plain vanilla GFP flags in their calls to __skb_alloc_page so this change makes it so that they use dev_alloc_page which just uses GFP_ATOMIC for the gfp_flags value. Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Matthew Vick <matthew.vick@intel.com> Cc: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5693d284dd
commit
42b17f0955
|
@ -83,7 +83,7 @@ static bool fm10k_alloc_mapped_page(struct fm10k_ring *rx_ring,
|
|||
return true;
|
||||
|
||||
/* alloc new page for storage */
|
||||
page = alloc_page(GFP_ATOMIC | __GFP_COLD);
|
||||
page = dev_alloc_page();
|
||||
if (unlikely(!page)) {
|
||||
rx_ring->rx_stats.alloc_failed++;
|
||||
return false;
|
||||
|
|
|
@ -6988,7 +6988,7 @@ static bool igb_alloc_mapped_page(struct igb_ring *rx_ring,
|
|||
return true;
|
||||
|
||||
/* alloc new page for storage */
|
||||
page = __skb_alloc_page(GFP_ATOMIC | __GFP_COLD, NULL);
|
||||
page = dev_alloc_page();
|
||||
if (unlikely(!page)) {
|
||||
rx_ring->rx_stats.alloc_failed++;
|
||||
return false;
|
||||
|
|
|
@ -1444,8 +1444,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring,
|
|||
|
||||
/* alloc new page for storage */
|
||||
if (likely(!page)) {
|
||||
page = __skb_alloc_pages(GFP_ATOMIC | __GFP_COLD | __GFP_COMP,
|
||||
bi->skb, ixgbe_rx_pg_order(rx_ring));
|
||||
page = dev_alloc_pages(ixgbe_rx_pg_order(rx_ring));
|
||||
if (unlikely(!page)) {
|
||||
rx_ring->rx_stats.alloc_rx_page_failed++;
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue