RE: [PATCH 14/20] IB/core: Add IB_DEVICE_OPA_MAD_SUPPORT device cap flag

Weiny, Ira
2015-01-14T18:47:16Z

>
> On 1/12/2015 7:11 PM, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
>
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> enum ib_signature_prot_cap {
> IB_PROT_T10DIF_TYPE_1 = 1,
> IB_PROT_T10DIF_TYPE_2 = 1 << 1,
> @@ -210,6 +214,7 @@ struct ib_device_attr {
> int sig_prot_cap;
> int sig_guard_cap;
> struct ib_odp_caps odp_caps;
> + u64 device_cap_flags2;
>
>
> Just make the existing kernel size device_cap_flags field a u64, note it's not
> blankly copied to user space in uverbs as part of a chunk, so just go there and
> copy the lower 32 bits.
>

It is an easy change but before changing this I'd like to hear what Roland or others think.

I prefer to define an additional field. Eventually we are likely to have flags which need to be communicated to user space. I think it will be cleaner at that time to report the entire new field rather than go through some sort of "upper 32 bit device capability" logic.

Thoughts?
Ira