RDMA/bnxt_re: Fix the sideband buffer size handling for FW commands
authorSelvin Xavier <selvin.xavier@broadcom.com>
Thu, 3 Aug 2023 08:45:23 +0000 (01:45 -0700)
committerLeon Romanovsky <leon@kernel.org>
Mon, 7 Aug 2023 13:39:42 +0000 (16:39 +0300)
commitc9f3e4e1d862f67d42720fdb680f4d7da64d7cc5
tree1cdad9f9964a756e1136ec064d5e7177c026bb0c
parentfd28c8a8c7a10e7b53851129c6d8dc5945108fe9
RDMA/bnxt_re: Fix the sideband buffer size handling for FW commands

bnxt_qplib_rcfw_alloc_sbuf allocates 24 bytes and it is better to fit
on stack variables. This way we can avoid unwanted kmalloc call.
Call dma_alloc_coherent directly instead of wrapper
bnxt_qplib_rcfw_alloc_sbuf.

Also, FW expects the side buffer  needs to be aligned to
BNXT_QPLIB_CMDQE_UNITS(16B). So align the size to have the
extra padding bytes.

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Hongguang Gao <hongguang.gao@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/1691052326-32143-4-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/qplib_fp.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
drivers/infiniband/hw/bnxt_re/qplib_sp.c