summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/ipoib.c
diff options
context:
space:
mode:
authorMichael Brown2009-07-17 23:50:33 +0200
committerMichael Brown2009-07-18 00:06:33 +0200
commit1f5c0239b4fc5dea895645397d5aaa3d4b95205a (patch)
tree0f4f5f50363702b601f3a7b966bc12a2a6797a22 /src/drivers/net/ipoib.c
parent[infiniband] Provide ib_get_hca_info() as a commonly-available function (diff)
downloadipxe-1f5c0239b4fc5dea895645397d5aaa3d4b95205a.tar.gz
ipxe-1f5c0239b4fc5dea895645397d5aaa3d4b95205a.tar.xz
ipxe-1f5c0239b4fc5dea895645397d5aaa3d4b95205a.zip
[infiniband] Centralise assumption of 2048-byte payloads
IPoIB and the SMA have separate constants for the packet size to be used to I/O buffer allocations. Merge these into the single IB_MAX_PAYLOAD_SIZE constant. (Various other points in the Infiniband stack have hard-coded assumptions of a 2048-byte payload; we don't currently support variable MTUs.)
Diffstat (limited to 'src/drivers/net/ipoib.c')
-rw-r--r--src/drivers/net/ipoib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c
index 51223e6d..03dfa53a 100644
--- a/src/drivers/net/ipoib.c
+++ b/src/drivers/net/ipoib.c
@@ -838,7 +838,7 @@ static int ipoib_open ( struct net_device *netdev ) {
IPOIB_META_NUM_CQES, &ipoib_meta_cq_op,
IPOIB_META_NUM_SEND_WQES,
IPOIB_META_NUM_RECV_WQES,
- IPOIB_PKT_LEN, IB_GLOBAL_QKEY ) ) != 0 ) {
+ IB_GLOBAL_QKEY ) ) != 0 ) {
DBGC ( ipoib, "IPoIB %p could not allocate metadata QP: %s\n",
ipoib, strerror ( rc ) );
goto err_create_meta_qset;
@@ -850,7 +850,7 @@ static int ipoib_open ( struct net_device *netdev ) {
IPOIB_DATA_NUM_CQES, &ipoib_data_cq_op,
IPOIB_DATA_NUM_SEND_WQES,
IPOIB_DATA_NUM_RECV_WQES,
- IPOIB_PKT_LEN, IB_GLOBAL_QKEY ) ) != 0 ) {
+ IB_GLOBAL_QKEY ) ) != 0 ) {
DBGC ( ipoib, "IPoIB %p could not allocate data QP: %s\n",
ipoib, strerror ( rc ) );
goto err_create_data_qset;
@@ -1040,7 +1040,7 @@ struct net_device * alloc_ipoibdev ( size_t priv_size ) {
if ( netdev ) {
netdev->ll_protocol = &ipoib_protocol;
netdev->ll_broadcast = ( uint8_t * ) &ipoib_broadcast;
- netdev->max_pkt_len = IPOIB_PKT_LEN;
+ netdev->max_pkt_len = IB_MAX_PAYLOAD_SIZE;
}
return netdev;
}