OSDN Git Service

RDMA/hns: Bugfix for calculating qp buffer size
authorLijun Ou <oulijun@huawei.com>
Mon, 24 Jun 2019 11:47:49 +0000 (19:47 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Sun, 7 Jul 2019 12:19:30 +0000 (09:19 -0300)
commite0222d18d628ce96f0def790ea26b6b7b3c18f78
tree7975a21b1acf69a3c2ed494b24d188ace73e0fbb
parent726be12f5ca0a9b464e7d91add512071e4c224f6
RDMA/hns: Bugfix for calculating qp buffer size

The buffer size of qp which used to allocate qp buffer space for storing
sqwqe and rqwqe will be the length of buffer space. The kernel driver will
use the buffer address and the same size to get the user memory. The same
size named buff_size of qp. According the algorithm of calculating, The
size of the two is not equal when users set the max sge of sq.

Fixes: b28ca7cceff8 ("RDMA/hns: Limit extend sq sge num")
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_qp.c