[ofa-general] Re: IB/core: Add creation flags to QPs
Hoang-Nam Nguyen
HNGUYEN at de.ibm.com
Wed Mar 26 08:08:51 PDT 2008
> Jack Morgenstein wrote:
> > No, it isn't. If the customer has an old libibverbs running against a
new
> > kernel (which uses your bitmap suggestion of bits 0..7), all his
> apps will fail
> > to run (the qp_type passed by the old libibverbs to the new kernel will
be
> > misinterpreted).
> Ok, Jack, I see your point now, sorry for being slow to catch up, so
> with this in mind:
> > This means that we are using the 3 LSBs in an enumerated fashion
> (integers 0..7), so
> > we can't use a bitmap here. This leads us to a mixed field anyway --
> > 3 bits for existing QP types (integers 0..6), and 29 bits of bit-map.
> Yes, so way we can go the somehow not very elegant way, that is have the
> uverbs code examine the u32 value and if the only non zero bits are
> among the 3 LS ones, uses the values from the old enum and if any of the
> remaining 29 bits are set consider their values under the bit field
> scheme, etc.
BTW: qp_type in struct ib_uverbs_create_qp is a __u8:
struct ib_uverbs_create_qp {
__u64 response;
__u64 user_handle;
__u32 pd_handle;
__u32 send_cq_handle;
__u32 recv_cq_handle;
__u32 srq_handle;
__u32 max_send_wr;
__u32 max_recv_wr;
__u32 max_send_sge;
__u32 max_recv_sge;
__u32 max_inline_data;
__u8 sq_sig_all;
__u8 qp_type;
__u8 is_srq;
__u8 qp_create_flags;
__u64 driver_data[0];
};
Nam
More information about the general
mailing list