[openib-general] ib_device_cap_flags
Sean Hefty
mshefty at ichips.intel.com
Thu Feb 10 09:58:11 PST 2005
Roland Dreier wrote:
> Michael> Hi! enum ib_device_cap_flags from ib_verbs.h does not
> Michael> seem to be used anywhere. Specifically there does not
> Michael> seem to exist a way to find out the device capabilities.
>
> Michael> # grep -rIi ib_device_cap_flags .
> Michael> ./include/ib_verbs.h:enum ib_device_cap_flags {
>
> This is partially because of Sean's somewhat unfortunate habit of
> defining enums but then just using "int" everywhere in the API. The
> way to get the capabilities is to use ib_query_device -- the flags
> will be returned in the device_cap_flags member of struct
> ib_device_attr.
Int is used because the returned value is a bitwise OR of the valid
capabilities, and is not a value defined by the enum. We can change
the enum values to #define if that would make it any easier.
- Sean
More information about the general
mailing list