RE: [PATCH 1/2] rdma/cm: support option to allow manually setting IB path

Sean Hefty
2009-10-22T00:14:59Z

>Maybe something simple:
>
>struct ibv_kern_path_rec2
>{
> u32 flags;
> struct ibv_kern_path_rec rec;
>}

This is more as an RFC:

Looking at ib_user_path_rec / ibv_kern_path_rec, we could just make use of the
existing bits that are available. We have 2 32-bit fields that are only used to
record a single bit of data, the gids, plus numb_path and preference fields.

We should be able to determine if a path is forward, reverse, or both by looking
at the sgid and the reversible bit. Preference (flags) could be used to
indicate if a path is primary, alternate, or for the CM only. With the
exception of the marking a path for the CM, the use of the fields in this manner
seems somewhat natural to me.