[Fwd: Re: [openib-general] ib_verbs.h ib_device_attr device type]
Hal Rosenstock
halr at voltaire.com
Wed Sep 1 07:58:45 PDT 2004
Here's a patch to ib_verbs.h define the flags for the ib_device
structure:
Index: ib_verbs.h
===================================================================
--- ib_verbs.h (revision 711)
+++ ib_verbs.h (working copy)
@@ -612,6 +612,11 @@
IB_MAD_IGNORE_MKEY = 1
};
+enum ib_device_flags {
+ IB_DEVICE_IS_SWITCH = 1,
+ IB_DEVICE_IS_ROUTER = 2
+};
+
#define IB_DEVICE_NAME_MAX 64
struct ib_device {
-----Forwarded Message-----
From: Hal Rosenstock <halr at voltaire.com>
To: Roland Dreier <roland at topspin.com>
Cc: openib-general at openib.org
Subject: Re: [openib-general] ib_verbs.h ib_device_attr device type
Date: Wed, 25 Aug 2004 12:59:30 -0400
On Wed, 2004-08-25 at 12:41, Roland Dreier wrote:
> Hal> Is there a way to determine whether a device is a HCA,
> Hal> switch, or router ? Does there need to be another field in
> Hal> ib_device_attr for this ?
>
> I would use the flags member of struct ib_device... add something like
>
> enum {
> IB_DEV_FLAG_IS_SWITCH = 1,
> /* etc */
> };
Sounds like a good solution to me.
-- Hal
_______________________________________________
openib-general mailing list
openib-general at openib.org
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
More information about the general
mailing list