git: e03c2c0f6c1a - main - libcxgb4: remove update_qp_state()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Sep 2026 14:47:49 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=e03c2c0f6c1a90e2d0797ad433c0269a0a775c52
commit e03c2c0f6c1a90e2d0797ad433c0269a0a775c52
Author: Steve Wise <swise@opengridcomputing.com>
AuthorDate: 2019-02-05 17:19:17 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-09-15 14:22:39 +0000
libcxgb4: remove update_qp_state()
Remove it because it is not needed. If we're flushing the qp, it is
because we've had a fatal error, so just set the user qp state to ERR
and continue on.
Sponsored by: Chelsio Communications
---
contrib/ofed/libcxgb4/qp.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/contrib/ofed/libcxgb4/qp.c b/contrib/ofed/libcxgb4/qp.c
index a41381bf4907..805200ab34ff 100644
--- a/contrib/ofed/libcxgb4/qp.c
+++ b/contrib/ofed/libcxgb4/qp.c
@@ -788,20 +788,6 @@ int c4iw_post_receive(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
return err;
}
-static void update_qp_state(struct c4iw_qp *qhp)
-{
- struct ibv_query_qp cmd;
- struct ibv_qp_attr attr;
- struct ibv_qp_init_attr iattr;
- int ret;
-
- ret = ibv_cmd_query_qp(&qhp->ibv_qp, &attr, IBV_QP_STATE, &iattr,
- &cmd, sizeof cmd);
- assert(!ret);
- if (!ret)
- qhp->ibv_qp.state = attr.qp_state;
-}
-
/*
* Assumes qhp lock is held.
*/
@@ -813,7 +799,7 @@ void c4iw_flush_qp(struct c4iw_qp *qhp)
if (qhp->wq.flushed)
return;
- update_qp_state(qhp);
+ qhp->ibv_qp.state = IBV_QPS_ERR;
rchp = to_c4iw_cq(qhp->ibv_qp.recv_cq);
schp = to_c4iw_cq(qhp->ibv_qp.send_cq);