]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4: reduce OOM risk on arches with large pages
authorEric Dumazet <edumazet@google.com>
Sat, 18 Feb 2017 18:34:18 +0000 (10:34 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Feb 2017 15:31:50 +0000 (10:31 -0500)
commit46a88b282f606995769afeb48c3bff95ad3e478e
tree769119cec70d8346762167c79335d677015c02b4
parent33fd821bf6bbd699966e140329560c48bf19e01e
mlx4: reduce OOM risk on arches with large pages

Since mlx4 NIC are used on PowerPC with 64K pages, we need to adapt
MLX4_EN_ALLOC_PREFER_ORDER definition.

Otherwise, a fragment sitting in an out of order TCP queue can hold
0.5 Mbytes and it is a serious OOM risk.

Fixes: 507240b469dd ("mlx4: allow order-0 memory allocations in RX path")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h