RDMA/hns: Enable inner_pa_vld filed of mpt
authoroulijun <oulijun@huawei.com>
Fri, 4 May 2018 02:57:11 +0000 (10:57 +0800)
committerDoug Ledford <dledford@redhat.com>
Wed, 9 May 2018 14:45:18 +0000 (10:45 -0400)
When enabled inner_pa_vld field of mpt, The pa0 and
pa1 will be valid and the hardware will use it
directly and not use base address of pbl. As a
result, it can reduce the delay.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c

index 46c3ab97e1bad7d62fa09e9bb7c07df54afeef24..7ecf0c911808ec6387653296fffb1f33a9b707c4 100644 (file)
@@ -1379,6 +1379,8 @@ static int hns_roce_v2_write_mtpt(void *mb_buf, struct hns_roce_mr *mr,
 
        roce_set_bit(mpt_entry->byte_12_mw_pa, V2_MPT_BYTE_12_PA_S,
                     mr->type == MR_TYPE_MR ? 0 : 1);
+       roce_set_bit(mpt_entry->byte_12_mw_pa, V2_MPT_BYTE_12_INNER_PA_VLD_S,
+                    1);
        mpt_entry->byte_12_mw_pa = cpu_to_le32(mpt_entry->byte_12_mw_pa);
 
        mpt_entry->len_l = cpu_to_le32(lower_32_bits(mr->size));