[ofa-general] How to use some ibv_wc fields ?

Tang, Changqing changquing.tang at hp.com
Mon Oct 1 08:20:19 PDT 2007


Can anyone tell how to use field 'qp_num' and 'src_qp' ?

I understand that qp_num is the destination QP's number, while src_qp is
the source
QP's number, right ?

Another question, how is qp number assigned to a QP ? is it a random
number, or
a number from 1 and then increasing with QPs ? one process basis or on
node basis ?

I hope to use qp_num to hash the QP pointer, then in SRQ mode, I know
who sent
the message. 

Thanks. 
--CQ


struct ibv_wc {
        uint64_t                wr_id;
        enum ibv_wc_status      status;
        enum ibv_wc_opcode      opcode;
        uint32_t                vendor_err;
        uint32_t                byte_len;
        uint32_t                imm_data;       /* in network byte order
*/
        uint32_t                qp_num;
        uint32_t                src_qp;
        enum ibv_wc_flags       wc_flags;
        uint16_t                pkey_index;
        uint16_t                slid;
        uint8_t                 sl;
        uint8_t                 dlid_path_bits;
};



More information about the general mailing list