ib_mad_completion_handler switches on wc.opcode, even if wc.status is not SUCCESS. This isn't correct, since according to the IB spec, wc.opcode may not be valid if the completion has an unsuccessful status. - R.