[ofa-general] multiple threads posting to the same QP

Or Gerlitz ogerlitz at voltaire.com
Sun Sep 30 07:18:19 PDT 2007


Roland,

Looking on libibverbs sources and man pages, I can't figure out if 
posting to the same QP by multiple threads is supported (or if it should 
be supported by the low level libraries):

> /**
>  * ibv_post_send - Post a list of work requests to a send queue.
>  */
> static inline int ibv_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr,
>                                 struct ibv_send_wr **bad_wr)
> {
>         return qp->context->ops.post_send(qp, wr, bad_wr);
> }
> 
> /**
>  * ibv_post_recv - Post a list of work requests to a receive queue.
>  */
> static inline int ibv_post_recv(struct ibv_qp *qp, struct ibv_recv_wr *wr,
>                                 struct ibv_recv_wr **bad_wr)
> {
>         return qp->context->ops.post_recv(qp, wr, bad_wr);
> }

I don't see here any locking nor any comment if the low-level library 
should lock or that the app must lock if multiple threads are posting, etc.

My understanding is that posting sends from thread X and recvs from 
thread Y is supported, but I can't really tell on multiple send posting, 
lets sync on this and then document that.

Dotan, is there any mentioning of multiple thread scheme in the 
libibverbs/librdmacm man pages?

Or.




More information about the general mailing list