[openib-general] Comms Errors

Sean Hefty mshefty at ichips.intel.com
Thu May 11 16:13:33 PDT 2006


Eric Barton wrote:
> int
> kiblnd_post_rx (kib_rx_t *rx, int credit)
> {
>         kib_conn_t         *conn = rx->rx_conn;
>         struct ib_recv_wr  *bad_wrq;
>         int                 rc;
> 
>         LASSERT (!in_interrupt());
>         LASSERT (credit == IBLND_POSTRX_NO_CREDIT ||
>                  credit == IBLND_POSTRX_PEER_CREDIT ||
>                  credit == IBLND_POSTRX_RSRVD_CREDIT);
> 
>         rx->rx_sge.length = IBLND_MSG_SIZE;
>         rx->rx_sge.lkey = kiblnd_data.kib_mr->lkey;
>         rx->rx_sge.addr = rx->rx_msgaddr;
> 
>         rx->rx_wrq.next = NULL;
>         rx->rx_wrq.sg_list = &rx->rx_sge;
>         rx->rx_wrq.num_sge = 1;
>         rx->rx_wrq.wr_id = kiblnd_ptr2wreqid(rx, IBLND_WID_RX);
> 
>         LASSERT (conn->ibc_state >= IBLND_CONN_INIT);
>         LASSERT (rx->rx_nob >= 0);              /* not posted */
> 
>         CDEBUG(D_NET, "posting rx [%d %x "LPX64"]\n",
>                rx->rx_wrq.sg_list->length,
>                rx->rx_wrq.sg_list->lkey,
>                rx->rx_wrq.sg_list->addr);
> 
>         if (conn->ibc_state > IBLND_CONN_ESTABLISHED) {
>                 /* No more posts for this rx; so lose its ref */
>                 kiblnd_conn_decref(conn);
>                 return 0;
>         }
> 
>         rx->rx_nob = -1;                        /* flag posted */
> 
>         rc = ib_post_recv(conn->ibc_cmid->qp, &rx->rx_wrq, &bad_wrq);
> ...

Based on your errors, my guess is that there's something wrong with the posted 
receive, but I don't see what from this code.  Can you post where you create the 
mr and map the receive buffers too?

- Sean



More information about the general mailing list