diff options
| author | Michael Brown | 2012-08-29 23:11:58 +0200 |
|---|---|---|
| committer | Michael Brown | 2012-08-31 22:22:57 +0200 |
| commit | f747fac3e1dad31378579326d8e9dce0df85c214 (patch) | |
| tree | 68393b4686b7d28737b16b26c6f49c4d2db431d0 /src/drivers/net | |
| parent | [iobuf] Allow allocation of I/O buffers with a specified alignment offset (diff) | |
| download | ipxe-f747fac3e1dad31378579326d8e9dce0df85c214.tar.gz ipxe-f747fac3e1dad31378579326d8e9dce0df85c214.tar.xz ipxe-f747fac3e1dad31378579326d8e9dce0df85c214.zip | |
[infiniband] Allow queue pairs to have a custom allocator for receive iobufs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net')
| -rw-r--r-- | src/drivers/net/ipoib.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c index 44afa2b61..8d4cc49eb 100644 --- a/src/drivers/net/ipoib.c +++ b/src/drivers/net/ipoib.c @@ -534,6 +534,11 @@ static struct ib_completion_queue_operations ipoib_cq_op = { .complete_recv = ipoib_complete_recv, }; +/** IPoIB queue pair operations */ +static struct ib_queue_pair_operations ipoib_qp_op = { + .alloc_iob = alloc_iob, +}; + /** * Poll IPoIB network device * @@ -667,9 +672,9 @@ static int ipoib_open ( struct net_device *netdev ) { } /* Allocate queue pair */ - ipoib->qp = ib_create_qp ( ibdev, IB_QPT_UD, - IPOIB_NUM_SEND_WQES, ipoib->cq, - IPOIB_NUM_RECV_WQES, ipoib->cq ); + ipoib->qp = ib_create_qp ( ibdev, IB_QPT_UD, IPOIB_NUM_SEND_WQES, + ipoib->cq, IPOIB_NUM_RECV_WQES, ipoib->cq, + &ipoib_qp_op ); if ( ! ipoib->qp ) { DBGC ( ipoib, "IPoIB %p could not allocate queue pair\n", ipoib ); |
