net/mlx5e: Implement Fragmented Work Queue (WQ)
authorTariq Toukan <[email protected]>
Wed, 30 Nov 2016 15:59:37 +0000 (17:59 +0200)
committerDavid S. Miller <[email protected]>
Fri, 2 Dec 2016 15:47:01 +0000 (10:47 -0500)
commit1c1b522808a18402f043c1418b4e48c7355480cc
treeab6a81cf98628e39cc8f570887487c136b08d92e
parent6c0c62035ea51fcacbfa408f991cae767e30b116
net/mlx5e: Implement Fragmented Work Queue (WQ)

Add new type of struct mlx5_frag_buf which is used to allocate fragmented
buffers rather than contiguous, and make the Completion Queues (CQs) use
it as they are big (default of 2MB per CQ in Striding RQ).

This fixes the failures of type:
"mlx5e_open_locked: mlx5e_open_channels failed, -12"
due to dma_zalloc_coherent insufficient contiguous coherent memory to
satisfy the driver's request when the user tries to setup more or larger
rings.

Signed-off-by: Tariq Toukan <[email protected]>
Reported-by: Sebastian Ott <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/mellanox/mlx5/core/alloc.c
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/wq.c
drivers/net/ethernet/mellanox/mlx5/core/wq.h
include/linux/mlx5/driver.h