Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes and improvements for libhns #1411

Merged
merged 5 commits into from
Dec 17, 2023
Merged

Conversation

hginjgerx
Copy link

The first 2 patches improve the performance of creating AH, relying on a corresponding kernel patch.

The rest patches are several bugfixes.

Junxian Huang and others added 5 commits December 8, 2023 10:08
To commit: d3f4020a213e ("RDMA/hns: Response dmac to userspace").

Signed-off-by: Junxian Huang <[email protected]>
As dmac is already resolved in kernel while creating AH, there is no
need to repeat the resolving in userspace. Prioritize getting dmac
from kernel driver, unless kernel driver didn't response one.

Signed-off-by: Junxian Huang <[email protected]>
When flushing cqe, the state of qp needs to be modified. The incoming qp
attr is not initialized, which may lead to undefined behavior.

Fixes: e1726e9 ("libhns: Support flush cqe for hip08 in user space")
Signed-off-by: Chengchang Tang <[email protected]>
Signed-off-by: Junxian Huang <[email protected]>
The ci/pi of hns roce cq allows data to be flipped. but in
__hns_roce_v2_cq_clean(), this flip may lead to an wrong number
of loops.

This patch fixes it by extending the data type to avoid data
flipping.

Fixes: 6fe30a1 ("libhns: Introduce QP operations referred to hip08 RoCE device")
Signed-off-by: Chengchang Tang <[email protected]>
Signed-off-by: Junxian Huang <[email protected]>
Currently the QPC state in HW is modified inside the critical section
of spinlock but the ibv_qp state is modified outside. There will be
a short period when QPC state has been modified to err with ibv_qp
state still remaining RTS. WQEs during this period will still be
post-send by RTS-state ibv_qp but then dropped by err-state HW with
no flush CQEs generated.

To fix this problem, the QPC state in HW and ibv_qp state should be
both modified to err inside the critical section of spinlock.

Fixes: f1a80cc ("libhns: Bugfix for flush cqe in case multi-process")
Signed-off-by: Yangyang Li <[email protected]>
Signed-off-by: Junxian Huang <[email protected]>
@rleon rleon merged commit 9016f34 into linux-rdma:master Dec 17, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants