Message ID | 82fd80bcd97dae02558e4122b7c6964f@alukardd.org (mailing list archive) |
---|---|
State | Deferred |
Headers | show |
PiBCYXJ0IFZhbiBBc3NjaGUgaGVscCB1cyBhbmQgcmVzdWx0aW5nIHBhdGNoIHlvdSBjYW4gc2Vl IGJlbG93Og0KPiBkaWZmIC0tZ2l0IGEvZHJpdmVycy9pbmZpbmliYW5kL3VscC9zcnAvaWJfc3Jw LmMNCj4gYi9kcml2ZXJzL2luZmluaWJhbmQvdWxwL3NycC9pYl9zcnAuYw0KPiBpbmRleCBjNWFm NjdhLi40NzBlYjU0IDEwMDY0NA0KPiAtLS0gYS9kcml2ZXJzL2luZmluaWJhbmQvdWxwL3NycC9p Yl9zcnAuYw0KPiArKysgYi9kcml2ZXJzL2luZmluaWJhbmQvdWxwL3NycC9pYl9zcnAuYw0KPiBA QCAtNTksNiArNTksNyBAQA0KPiAgICNpbmNsdWRlICIuLi8uLi8uLi8uLi9pbmNsdWRlL3Njc2kv c2NzaV90cmFuc3BvcnRfc3JwLmgiDQo+IA0KPiAgICNpbmNsdWRlICJpYl9zcnAuaCINCj4gKyNp bmNsdWRlIDxsaW51eC9kZWxheS5oPg0KPiANCj4gICAjZGVmaW5lIERSVl9OQU1FCSJpYl9zcnAi DQo+ICAgI2RlZmluZSBQRlgJCURSVl9OQU1FICI6ICINCj4gQEAgLTYyMSwxMSArNjIyLDcgQEAg c3RhdGljIHZvaWQgc3JwX2Rlc3Ryb3lfcXAoc3RydWN0IHNycF9yZG1hX2NoICpjaCkNCj4gICAJ aWYgKHJldCkNCj4gICAJCWdvdG8gb3V0Ow0KPiANCj4gLQlpbml0X2NvbXBsZXRpb24oJmNoLT5k b25lKTsNCj4gLQlyZXQgPSBpYl9wb3N0X3JlY3YoY2gtPnFwLCAmd3IsICZiYWRfd3IpOw0KPiAt CVdBUk5fT05DRShyZXQsICJpYl9wb3N0X3JlY3YoKSByZXR1cm5lZCAlZFxuIiwgcmV0KTsNCj4g LQlpZiAocmV0ID09IDApDQo+IC0JCXdhaXRfZm9yX2NvbXBsZXRpb24oJmNoLT5kb25lKTsNCj4g Kwltc2xlZXAoMTAwKTsNCj4gDQo+ICAgb3V0Og0KPiAgIAlpYl9kZXN0cm95X3FwKGNoLT5xcCk7 DQoNClBvc3QgcmVjZWl2ZSBjYW4gcmV0dXJuIGEgc3luY2hyb25vdXMgZmFpbHVyZS4gICBUaGUg cXVlc3Rpb24gd291bGQgYmUgd2hpY2ggb25lIGFuZCB3aHk/DQoNCkJhcnQsIGFueSBpZGVhcz8N Cg0KTWlrZQ0K -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/16/2015 01:15 PM, Marciniszyn, Mike wrote: >> Bart Van Assche help us and resulting patch you can see below: >> diff --git a/drivers/infiniband/ulp/srp/ib_srp.c >> b/drivers/infiniband/ulp/srp/ib_srp.c >> index c5af67a..470eb54 100644 >> --- a/drivers/infiniband/ulp/srp/ib_srp.c >> +++ b/drivers/infiniband/ulp/srp/ib_srp.c >> @@ -59,6 +59,7 @@ >> #include "../../../../include/scsi/scsi_transport_srp.h" >> >> #include "ib_srp.h" >> +#include <linux/delay.h> >> >> #define DRV_NAME "ib_srp" >> #define PFX DRV_NAME ": " >> @@ -621,11 +622,7 @@ static void srp_destroy_qp(struct srp_rdma_ch *ch) >> if (ret) >> goto out; >> >> - init_completion(&ch->done); >> - ret = ib_post_recv(ch->qp, &wr, &bad_wr); >> - WARN_ONCE(ret, "ib_post_recv() returned %d\n", ret); >> - if (ret == 0) >> - wait_for_completion(&ch->done); >> + msleep(100); >> >> out: >> ib_destroy_qp(ch->qp); > > Post receive can return a synchronous failure. The question would be which one and why? > > Bart, any ideas? Hello Mike, ib_post_recv() can indeed return a synchronous failure. But I think a synchronous failure should be handled properly by the SRP initiator driver: if ret < 0 then the wait_for_completion() call is skipped. What Alexey reported is that the wait_for_completion() call did not finish which means that ib_post_recv() returned 0. Or did I perhaps misinterpret something ? Thanks, Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index c5af67a..470eb54 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -59,6 +59,7 @@ #include "../../../../include/scsi/scsi_transport_srp.h" #include "ib_srp.h" +#include <linux/delay.h> #define DRV_NAME "ib_srp" #define PFX DRV_NAME ": " @@ -621,11 +622,7 @@ static void srp_destroy_qp(struct srp_rdma_ch *ch) if (ret) goto out; - init_completion(&ch->done); - ret = ib_post_recv(ch->qp, &wr, &bad_wr); - WARN_ONCE(ret, "ib_post_recv() returned %d\n", ret); - if (ret == 0) - wait_for_completion(&ch->done); + msleep(100); out: ib_destroy_qp(ch->qp);