[ofa-general] Re: RFCv2: SRC API

Michael S. Tsirkin mst at dev.mellanox.co.il
Thu Aug 9 06:31:06 PDT 2007


> Quoting Tang, Changqing <changquing.tang at hp.com>:
> Subject: RE: RFCv2: SRC API
> 
>  
> > > I have another question, when using SRQ, or SRC+SRQ, when a 
> > completion 
> > > is returned by ibv_poll_cq(),  is there an easy way to find 
> > who sent 
> > > this message to me ? 'struct ibv_wc' does not say much about the 
> > > message source rank. The only field is 'src_qp', but I can not find 
> > > any document about how to use it.
> > 
> > There's also qp_num.
> 
> 1. src_qp is 'uint32_t', what does it mean ?

Natuarally high 8 bit are 0 - there's no type in C that is 24 bit wide.

> Translate 'src_qp/qp_num'
> to source info is not easy, right ?

source info is a rank?
You'll have to build a table and to a lookup, yes.

> 2. for SRC+SRQ, these two fields are not useful, because if a rank is
> not the rank who made connection (j3,j4, not j2, as we discussed), it
> has no information about the send QP.

You can supply the send QPN information when you exchange SRQ number info.

> > 
> > > Is there any way to return some kind of "source context" ?
> > > 
> > > Or do you think this is application's responsibility to figure out 
> > > source rank from the message itself ? I hope the source rank can be 
> > > identified before parsing the message.
> > > 
> > > Thanks.
> > 
> > How about using send with immediate, and sticking the rank in 
> > the immediate data?
> 
> I always think 'send-with-immediate' is slower than 'send', am I wrong ?

Donnu.
32 bit immediate seems unlikely to have much of an overhead.

> Anyway this is the best way so far.

-- 
MST



More information about the general mailing list