diff options
author | oulijun <oulijun@huawei.com> | 2018-04-26 08:46:18 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-04-27 20:20:47 +0200 |
commit | 6852af86627c7bd8de11c9ad3eb5cca7d99e5884 (patch) | |
tree | 495db3a00870a0304748ade77019c7546ba37834 /drivers/infiniband | |
parent | RDMA/hns: Fix the qp context state diagram (diff) | |
download | linux-6852af86627c7bd8de11c9ad3eb5cca7d99e5884.tar.xz linux-6852af86627c7bd8de11c9ad3eb5cca7d99e5884.zip |
RDMA/hns: Only assign mtu if IB_QP_PATH_MTU bit is set
Only when the IB_QP_PATH_MTU flag of attr_mask is set
it is valid to assign the mtu field of qp context when
qp type is not GSI and UD.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index a4eea701d19d..9a3148103a5f 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -2850,7 +2850,7 @@ static int modify_qp_init_to_rtr(struct ib_qp *ibqp, if (ibqp->qp_type == IB_QPT_GSI || ibqp->qp_type == IB_QPT_UD) roce_set_field(context->byte_24_mtu_tc, V2_QPC_BYTE_24_MTU_M, V2_QPC_BYTE_24_MTU_S, IB_MTU_4096); - else + else if (attr_mask & IB_QP_PATH_MTU) roce_set_field(context->byte_24_mtu_tc, V2_QPC_BYTE_24_MTU_M, V2_QPC_BYTE_24_MTU_S, attr->path_mtu); |