|
@@ -424,7 +424,12 @@ int ib_post_recv ( struct ib_device *ibdev, struct ib_queue_pair *qp,
|
424
|
424
|
*/
|
425
|
425
|
void ib_complete_send ( struct ib_device *ibdev, struct ib_queue_pair *qp,
|
426
|
426
|
struct io_buffer *iobuf, int rc ) {
|
427
|
|
- qp->send.cq->op->complete_send ( ibdev, qp, iobuf, rc );
|
|
427
|
+
|
|
428
|
+ if ( qp->send.cq->op->complete_send ) {
|
|
429
|
+ qp->send.cq->op->complete_send ( ibdev, qp, iobuf, rc );
|
|
430
|
+ } else {
|
|
431
|
+ free_iob ( iobuf );
|
|
432
|
+ }
|
428
|
433
|
qp->send.fill--;
|
429
|
434
|
}
|
430
|
435
|
|
|
@@ -440,7 +445,12 @@ void ib_complete_send ( struct ib_device *ibdev, struct ib_queue_pair *qp,
|
440
|
445
|
void ib_complete_recv ( struct ib_device *ibdev, struct ib_queue_pair *qp,
|
441
|
446
|
struct ib_address_vector *av,
|
442
|
447
|
struct io_buffer *iobuf, int rc ) {
|
443
|
|
- qp->recv.cq->op->complete_recv ( ibdev, qp, av, iobuf, rc );
|
|
448
|
+
|
|
449
|
+ if ( qp->recv.cq->op->complete_recv ) {
|
|
450
|
+ qp->recv.cq->op->complete_recv ( ibdev, qp, av, iobuf, rc );
|
|
451
|
+ } else {
|
|
452
|
+ free_iob ( iobuf );
|
|
453
|
+ }
|
444
|
454
|
qp->recv.fill--;
|
445
|
455
|
}
|
446
|
456
|
|