[Fwd: Re: [openib-general] ib_verbs.h ib_device_attr device type]
Sean Hefty
mshefty at ichips.intel.com
Wed Sep 1 10:34:34 PDT 2004
On Wed, 01 Sep 2004 10:58:45 -0400
Hal Rosenstock <halr at voltaire.com> wrote:
> Here's a patch to ib_verbs.h define the flags for the ib_device
> structure:
>
> +enum ib_device_flags {
> + IB_DEVICE_IS_SWITCH = 1,
> + IB_DEVICE_IS_ROUTER = 2
> +};
> +
Here's an updated patch based on our conversations. I debated about whether to define node_type as a u8 or an enum, but went with u8 to match the NodeInfo record.
Index: ib_verbs.h
===================================================================
--- ib_verbs.h (revision 712)
+++ ib_verbs.h (working copy)
@@ -609,6 +609,12 @@
IB_CQ_NEXT_COMP
};
+enum ib_node_type {
+ IB_NODE_CA = 1,
+ IB_NODE_SWITCH,
+ IB_NODE_ROUTER
+};
+
enum ib_process_mad_flags {
IB_MAD_IGNORE_MKEY = 1
};
@@ -733,6 +739,7 @@
struct ib_mad *out_mad);
struct class_device class_dev;
+ u8 node_type;
};
static inline int ib_query_device(struct ib_device *device,
More information about the general
mailing list