summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/infiniband.h
diff options
context:
space:
mode:
authorMichael Brown2009-08-10 12:47:11 +0200
committerMichael Brown2009-08-10 23:25:57 +0200
commit8de49af0d25b5695f6dcb5db77a142d2fb708f3f (patch)
treeb4c34f71a503a2bfe03d87d78e160cc4a2f258a6 /src/include/gpxe/infiniband.h
parent[infiniband] Add find_ibdev() (diff)
downloadipxe-8de49af0d25b5695f6dcb5db77a142d2fb708f3f.tar.gz
ipxe-8de49af0d25b5695f6dcb5db77a142d2fb708f3f.tar.xz
ipxe-8de49af0d25b5695f6dcb5db77a142d2fb708f3f.zip
[infiniband] Add last_opened_ibdev(), analogous to last_opened_netdev()
The minimal-surprise behaviour, when no explicit SRP initiator device is specified, will probably be to use the most recently opened Infiniband device. This matches our behaviour with using the most recently opened net device for PXE, iSCSI, AoE, NBI, etc.
Diffstat (limited to 'src/include/gpxe/infiniband.h')
-rw-r--r--src/include/gpxe/infiniband.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/gpxe/infiniband.h b/src/include/gpxe/infiniband.h
index 771d2a07..69bc69b5 100644
--- a/src/include/gpxe/infiniband.h
+++ b/src/include/gpxe/infiniband.h
@@ -368,6 +368,8 @@ struct ib_device {
struct refcnt refcnt;
/** List of Infiniband devices */
struct list_head list;
+ /** List of open Infiniband devices */
+ struct list_head open_list;
/** Underlying device */
struct device *dev;
/** List of completion queues */
@@ -473,6 +475,7 @@ extern struct ib_device * alloc_ibdev ( size_t priv_size );
extern int register_ibdev ( struct ib_device *ibdev );
extern void unregister_ibdev ( struct ib_device *ibdev );
extern struct ib_device * find_ibdev ( struct ib_gid *gid );
+extern struct ib_device * last_opened_ibdev ( void );
extern void ib_link_state_changed ( struct ib_device *ibdev );
extern void ib_poll_eq ( struct ib_device *ibdev );
extern struct list_head ib_devices;