<html><body>
<p>I was trying out the grmpp module on a Power machine and kept to running into the following error "grmpp: failed path record query: -22". Debugging this revealed that this was a problem with the following code in recv_handler(0 in the sa_query.c file :<br>
<br>
if (query && query->callback) {<br>
        if (mad_recv_wc->wc->status == IB_WC_SUCCESS)<br>
                 query->callback(query,<br>
                                 mad_recv_wc->recv_buf.mad->mad_hdr.status ?<br>
                                 -EINVAL : 0,<br>
                                 (struct ib_sa_mad *) mad_recv_wc->recv_buf.mad);<br>
<br>
Now mad_hdr.status field is declared as   __be16. So, should the check  be (mad_recv_wc->recv_buf.mad->mad_hdr.status & 0xff) before we return EINVAL?<br>
<br>
That change seemed to fix the grmpp problem for me.<br>
<br>
Pradeep<br>
pradeep@us.ibm.com</body></html>