• Tariq Toukan's avatar
    net/mlx5: Fix QP fragmented buffer allocation · d7037ad7
    Tariq Toukan authored
    Fix bad alignment of SQ buffer in fragmented QP allocation.
    It should start directly after RQ buffer ends.
    
    Take special care of the end case where the RQ buffer does not occupy
    a whole page. RQ size is a power of two, so would be the case only for
    small RQ sizes (RQ size < PAGE_SIZE).
    
    Fix wrong assignments for sqb->size (mistakenly assigned RQ size),
    and for npages value of RQ and SQ.
    
    Fixes: 3a2f7033 ("net/mlx5: Use order-0 allocations for all WQ types")
    Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    d7037ad7
wq.c 6.92 KB