IB/mlx4: Consolidate code to get an entry from a struct mlx4_buf
We use struct mlx4_buf for kernel QP, CQ and SRQ buffers, and the code
to look up an entry is duplicated in get_cqe_from_buf() and the QP and
SRQ versions of get_wqe(). Factor this out into mlx4_buf_offset().
This will also make it easier to switch over to using vmap() for buffers.
Signed-off-by:
Roland Dreier <rolandd@cisco.com>
Showing
- drivers/infiniband/hw/mlx4/cq.c 1 addition, 7 deletionsdrivers/infiniband/hw/mlx4/cq.c
- drivers/infiniband/hw/mlx4/qp.c 1 addition, 5 deletionsdrivers/infiniband/hw/mlx4/qp.c
- drivers/infiniband/hw/mlx4/srq.c 1 addition, 7 deletionsdrivers/infiniband/hw/mlx4/srq.c
- include/linux/mlx4/device.h 8 additions, 0 deletionsinclude/linux/mlx4/device.h
Loading
Please register or sign in to comment