Skip to content

Commit dceeab0

Browse files
Eric Dumazetdavem330
authored andcommitted
mlx4: support __GFP_MEMALLOC for rx
Commit 04aeb56 ("net/mlx4_en: allocate non 0-order pages for RX ring with __GFP_NOMEMALLOC") added code that appears to be not needed at that time, since mlx4 never used __GFP_MEMALLOC allocations anyway. As using memory reserves is a must in some situations (swap over NFS or iSCSI), this patch adds this flag. Note that this driver does not reuse pages (yet) so we do not have to add anything else. Signed-off-by: Eric Dumazet <[email protected]> Cc: Konstantin Khlebnikov <[email protected]> Cc: Tariq Toukan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8a43c05 commit dceeab0

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+2
-1
lines changed

drivers/net/ethernet/mellanox/mlx4/en_rx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,8 @@ static bool mlx4_en_refill_rx_buffers(struct mlx4_en_priv *priv,
706706
do {
707707
if (mlx4_en_prepare_rx_desc(priv, ring,
708708
ring->prod & ring->size_mask,
709-
GFP_ATOMIC | __GFP_COLD))
709+
GFP_ATOMIC | __GFP_COLD |
710+
__GFP_MEMALLOC))
710711
break;
711712
ring->prod++;
712713
} while (--missing);

0 commit comments

Comments
 (0)