[openib-general] Question On mad.c
Sean Hefty
mshefty at ichips.intel.com
Fri Jan 20 09:28:54 PST 2006
Devesh Sharma wrote:
> In mad.c while calling ib_post_receive() operation
>
> spin_lock_irqsave(&recv_queue->lock, flags);
>
> post = (++recv_queue->count < recv_queue->max_active);
>
> list_add_tail(&mad_priv->header.mad_list.list, &recv_queue->list);
> spin_unlock_irqrestore(&recv_queue->lock, flags);
> ret = ib_post_recv(qp_info->qp, &recv_wr, &bad_recv_wr);
>
> This is in while loop till "post" variable remains true, value of
> max_active is 512 So loop will go 512 times.
>
> If the qp on which this posting is going on dose not supports 512
> recevie descriptors posting then what will happen?
> Although during qp creation max_recv supported will be returned but
> loop is independent of this.
The QP is created with a size of IB_MAD_QP_RECV_SIZE (512). If the hardware
cannot support this size of a QP, then the create QP call will fail. I.e. the
hardware can provide a QP that is larger, but not smaller. The code cannot
adjust to using a larger size without resizing the corresponding CQ, which is
not yet supported.
- Sean
More information about the general
mailing list