summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2009-07-08 05:31:48 +0200
committerMichael Brown2009-07-18 00:06:34 +0200
commit0582a84e660e9dcd42a645bb51892f8c008edf3e (patch)
tree026ec68d2ead9ff42f98f15bff14aed0bc1a39c6
parent[ipoib] Attempt the broadcast group join only if the link is up (diff)
downloadipxe-0582a84e660e9dcd42a645bb51892f8c008edf3e.tar.gz
ipxe-0582a84e660e9dcd42a645bb51892f8c008edf3e.tar.xz
ipxe-0582a84e660e9dcd42a645bb51892f8c008edf3e.zip
[infiniband] Improve ib_packet debugging messages
-rw-r--r--src/net/infiniband/ib_packet.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/net/infiniband/ib_packet.c b/src/net/infiniband/ib_packet.c
index 3170a205..409ef2f8 100644
--- a/src/net/infiniband/ib_packet.c
+++ b/src/net/infiniband/ib_packet.c
@@ -213,15 +213,23 @@ int ib_pull ( struct ib_device *ibdev, struct io_buffer *iobuf,
/* Determine destination QP, if applicable */
if ( qp ) {
if ( IB_LID_MULTICAST ( lid ) && grh ) {
- *qp = ib_find_qp_mgid ( ibdev, &grh->dgid );
+ if ( ! ( *qp = ib_find_qp_mgid ( ibdev, &grh->dgid ))){
+ DBGC ( ibdev, "IBDEV %p RX for unknown MGID "
+ "%08x:%08x:%08x:%08x\n", ibdev,
+ ntohl ( grh->dgid.u.dwords[0] ),
+ ntohl ( grh->dgid.u.dwords[1] ),
+ ntohl ( grh->dgid.u.dwords[2] ),
+ ntohl ( grh->dgid.u.dwords[3] ) );
+ return -ENODEV;
+ }
} else {
- *qp = ib_find_qp_qpn ( ibdev, qpn );
- }
- if ( ! *qp ) {
- DBGC ( ibdev, "IBDEV %p RX for nonexistent QP\n",
- ibdev );
- return -ENODEV;
+ if ( ! ( *qp = ib_find_qp_qpn ( ibdev, qpn ) ) ) {
+ DBGC ( ibdev, "IBDEV %p RX for nonexistent "
+ "QPN %lx\n", ibdev, qpn );
+ return -ENODEV;
+ }
}
+ assert ( *qp );
}
DBGC2 ( ibdev, "IBDEV %p RX %04x:%08lx <= %04x:%08lx (key %08x)\n",