summaryrefslogtreecommitdiffstats
path: root/src/drivers/infiniband
diff options
context:
space:
mode:
authorMichael Brown2012-08-29 23:11:58 +0200
committerMichael Brown2012-08-31 22:22:57 +0200
commitf747fac3e1dad31378579326d8e9dce0df85c214 (patch)
tree68393b4686b7d28737b16b26c6f49c4d2db431d0 /src/drivers/infiniband
parent[iobuf] Allow allocation of I/O buffers with a specified alignment offset (diff)
downloadipxe-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/infiniband')
-rw-r--r--src/drivers/infiniband/hermon.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/drivers/infiniband/hermon.c b/src/drivers/infiniband/hermon.c
index e7db0359..ff95e95f 100644
--- a/src/drivers/infiniband/hermon.c
+++ b/src/drivers/infiniband/hermon.c
@@ -3128,6 +3128,11 @@ static int hermon_eth_transmit ( struct net_device *netdev,
return 0;
}
+/** Hermon Ethernet queue pair operations */
+static struct ib_queue_pair_operations hermon_eth_qp_op = {
+ .alloc_iob = alloc_iob,
+};
+
/**
* Handle Hermon Ethernet device send completion
*
@@ -3225,7 +3230,8 @@ static int hermon_eth_open ( struct net_device *netdev ) {
/* Allocate queue pair */
port->eth_qp = ib_create_qp ( ibdev, IB_QPT_ETH,
HERMON_ETH_NUM_SEND_WQES, port->eth_cq,
- HERMON_ETH_NUM_RECV_WQES, port->eth_cq );
+ HERMON_ETH_NUM_RECV_WQES, port->eth_cq,
+ &hermon_eth_qp_op );
if ( ! port->eth_qp ) {
DBGC ( hermon, "Hermon %p port %d could not create queue "
"pair\n", hermon, ibdev->port );