libcxgb4: set *bad_wr in post_send/recv error paths
PATCH 1/1 libcxgb4: set *bad_wr in post_send/recv error paths
--- providers/cxgb4/qp.c | 4 ++++ 1 file changed, 4 insertions(+)
providers/cxgb4/qp.c +4 -0
@@ -303,11 +303,13 @@ int c4iw_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,pthread_spin_lock (&qhp->lock);if (t4_wq_in_error (&qhp->wq)) {pthread_spin_unlock (&qhp->lock); + *bad_wr = wr;return -EINVAL ; } num_wrs =t4_sq_avail (&qhp->wq);if (num_wrs ==0 ) {pthread_spin_unlock (&qhp->lock); + *bad_wr = wr;return -ENOMEM ; }while (wr) {
@@ -403,12 +405,14 @@ int c4iw_post_receive(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,pthread_spin_lock (&qhp->lock);if (t4_wq_in_error (&qhp->wq)) {pthread_spin_unlock (&qhp->lock); + *bad_wr = wr;return -EINVAL ; }INC_STAT (recv); num_wrs =t4_rq_avail (&qhp->wq);if (num_wrs ==0 ) {pthread_spin_unlock (&qhp->lock); + *bad_wr = wr;return -ENOMEM ; }while (wr) {
Signature · 6 lines
1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Looks like same fix should be applied to cxgb4 driver, right?
Yuval
Quoted 45 lines · Steve Wise
Signed-off-by Steve Wise <[email protected]>--- providers/cxgb4/qp.c | 4 ++++ 1 file changed, 4 insertions(+)providers/cxgb4/qp.c +4
-0@@ -303,11 +303,13 @@ int c4iw_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,pthread_spin_lock (&qhp->lock);if (t4_wq_in_error (&qhp->wq)) {pthread_spin_unlock (&qhp->lock); + *bad_wr = wr;return -EINVAL ; } num_wrs =t4_sq_avail (&qhp->wq);if (num_wrs ==0 ) {pthread_spin_unlock (&qhp->lock); + *bad_wr = wr;return -ENOMEM ; }while (wr) {@@ -403,12 +405,14 @@ int c4iw_post_receive(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,pthread_spin_lock (&qhp->lock);if (t4_wq_in_error (&qhp->wq)) {pthread_spin_unlock (&qhp->lock); + *bad_wr = wr;return -EINVAL ; }INC_STAT (recv); num_wrs =t4_rq_avail (&qhp->wq);if (num_wrs ==0 ) {pthread_spin_unlock (&qhp->lock); + *bad_wr = wr;return -ENOMEM ; }while (wr) {Signature · 6 lines
1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines
Looks like same fix should be applied to cxgb4 driver, right?
Yuval
Hey Yuval,
Yes, I sent out that fix earlier:
https://www.spinics.net/lists/linux-rdma/msg42000.html
Steve.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Yuval Shaia
Reviewed-byI see,
so FWIW:
Quoted 9 lines · Steve Wise
Quoted 4 lines
Looks like same fix should be applied to cxgb4 driver, right?
Yuval
Hey Yuval,
Yes, I sent out that fix earlier:
Quoted 8 lines
https://www.spinics.net/lists/linux-rdma/msg42000.html
Steve.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Leon Romanovsky
AppliedQuoted 4 lines · Steve Wise
Signed-off-by Steve Wise <[email protected]>--- providers/cxgb4/qp.c | 4 ++++ 1 file changed, 4 insertions(+)
Thanks, applied.