aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@redhat.com>2014-11-11 12:26:57 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-12 00:00:14 -0500
commit42b17f09550170fd238d76368e8fa8dfcc893082 (patch)
treef9eb4c4fc6254d84b9d168288a3ccb21fa3e905f /drivers/net
parent5693d284dd718313ca2f63a189193d4189889183 (diff)
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_main.c2
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c3
3 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index e645af412e76..73457ede53ec 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -83,7 +83,7 @@ static bool fm10k_alloc_mapped_page(struct fm10k_ring *rx_ring,
83 return true; 83 return true;
84 84
85 /* alloc new page for storage */ 85 /* alloc new page for storage */
86 page = alloc_page(GFP_ATOMIC | __GFP_COLD); 86 page = dev_alloc_page();
87 if (unlikely(!page)) { 87 if (unlikely(!page)) {
88 rx_ring->rx_stats.alloc_failed++; 88 rx_ring->rx_stats.alloc_failed++;
89 return false; 89 return false;
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index a2d72a87cbde..1e35fae7a62b 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -6988,7 +6988,7 @@ static bool igb_alloc_mapped_page(struct igb_ring *rx_ring,
6988 return true; 6988 return true;
6989 6989
6990 /* alloc new page for storage */ 6990 /* alloc new page for storage */
6991 page = __skb_alloc_page(GFP_ATOMIC | __GFP_COLD, NULL); 6991 page = dev_alloc_page();
6992 if (unlikely(!page)) { 6992 if (unlikely(!page)) {
6993 rx_ring->rx_stats.alloc_failed++; 6993 rx_ring->rx_stats.alloc_failed++;
6994 return false; 6994 return false;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index a5ca877eac1a..f5fcba4f9d21 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1444,8 +1444,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring,
1444 1444
1445 /* alloc new page for storage */ 1445 /* alloc new page for storage */
1446 if (likely(!page)) { 1446 if (likely(!page)) {
1447 page = __skb_alloc_pages(GFP_ATOMIC | __GFP_COLD | __GFP_COMP, 1447 page = dev_alloc_pages(ixgbe_rx_pg_order(rx_ring));
1448 bi->skb, ixgbe_rx_pg_order(rx_ring));
1449 if (unlikely(!page)) { 1448 if (unlikely(!page)) {
1450 rx_ring->rx_stats.alloc_rx_page_failed++; 1449 rx_ring->rx_stats.alloc_rx_page_failed++;
1451 return false; 1450 return false;