[infiniband] Flush uncompleted work queue entries at QP teardown
authorMichael Brown <mcb30@etherboot.org>
Thu, 2 Oct 2008 23:07:52 +0000 (00:07 +0100)
committerMichael Brown <mcb30@etherboot.org>
Tue, 11 Nov 2008 05:31:06 +0000 (05:31 +0000)
commitd9751edafa08b2ec3779004d4209400b95884cd4
tree532aaeda86668006aee5fc6994e6f0b773c2a427
parentdd34500188d942b10bacbc512cb581f51e371089
[infiniband] Flush uncompleted work queue entries at QP teardown

Avoid leaking I/O buffers in ib_destroy_qp() by completing any
outstanding work queue entries with a generic error code.  This
requires the completion handlers to be available to ib_destroy_qp(),
which is done by making them static configuration parameters of the CQ
(set by ib_create_cq()) rather than being provided on each call to
ib_poll_cq().

This mimics the functionality of netdev_{tx,rx}_flush().  The netdev
flush functions would previously have been catching any I/O buffers
leaked by the IPoIB data queue (though not by the IPoIB metadata
queue).
src/drivers/infiniband/arbel.c
src/drivers/infiniband/hermon.c
src/drivers/net/ipoib.c
src/include/gpxe/infiniband.h
src/net/infiniband.c