Browse Source

net/mlx4_en: allocate non 0-order pages for RX ring with __GFP_NOMEMALLOC

High order pages are optional here since commit 51151a16a60f ("mlx4: allow
order-0 memory allocations in RX path"), so here is no reason for depleting
reserves. Generic __netdev_alloc_frag() implements the same logic.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Konstantin Khlebnikov 9 years ago
parent
commit
04aeb56a17
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/ethernet/mellanox/mlx4/en_rx.c

+ 1 - 1
drivers/net/ethernet/mellanox/mlx4/en_rx.c

@@ -61,7 +61,7 @@ static int mlx4_alloc_pages(struct mlx4_en_priv *priv,
 		gfp_t gfp = _gfp;
 
 		if (order)
-			gfp |= __GFP_COMP | __GFP_NOWARN;
+			gfp |= __GFP_COMP | __GFP_NOWARN | __GFP_NOMEMALLOC;
 		page = alloc_pages(gfp, order);
 		if (likely(page))
 			break;