RDMA/hns: Remove redundant operations on CMDQ
authorLang Cheng <chenglang@huawei.com>
Sun, 7 Feb 2021 08:55:41 +0000 (16:55 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 16 Feb 2021 18:42:58 +0000 (14:42 -0400)
commit563aeb226630610707980e8abe20af1e6f410ce4
tree9fde54d3811d85b46e04eaf60ded7f2df09dfc83
parent8f86e2eadac968200a6ab1d7074fc0f5cbc1e075
RDMA/hns: Remove redundant operations on CMDQ

CMDQ works serially, after each successful transmission, the head and tail
pointers will be equal, so there is no need to check whether the queue is
full. At the same time, since the descriptor of each transmission is new,
there is no need to perform a cleanup operation. Then, the field named
next_to_clean in structure hns_roce_v2_cmq_ring is redundant.

Fixes: a04ff739f2a9 ("RDMA/hns: Add command queue support for hip08 RoCE driver")
Link: https://lore.kernel.org/r/1612688143-28226-4-git-send-email-liweihang@huawei.com
Signed-off-by: Lang Cheng <chenglang@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h