diff options
author | Christian Iversen <ci@iversenit.dk> | 2021-01-27 00:43:51 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2021-01-27 01:15:35 +0000 |
commit | b9de7e6eda04cecaff6735a60c7fe7f488fdccf1 (patch) | |
tree | 5ddb8c4da2964b5b9e2fb2e4ceb154a6d523522c /src/include/ipxe/infiniband.h | |
parent | 4f9fbe6c16e0d0b8930e2ef9880b9e54c264e685 (diff) | |
download | ipxe-b9de7e6eda04cecaff6735a60c7fe7f488fdccf1.tar.gz |
[infiniband] Require drivers to specify the number of ports
Require drivers to report the total number of Infiniband ports. This
is necessary to report the correct number of ports on devices with
dynamic port types.
For example, dual-port Mellanox cards configured for (eth, ib) would
be rejected by the subnet manager, because they report using "port 2,
out of 1".
Signed-off-by: Christian Iversen <ci@iversenit.dk>
Diffstat (limited to 'src/include/ipxe/infiniband.h')
-rw-r--r-- | src/include/ipxe/infiniband.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/ipxe/infiniband.h b/src/include/ipxe/infiniband.h index 6f4951f17..379bc109e 100644 --- a/src/include/ipxe/infiniband.h +++ b/src/include/ipxe/infiniband.h @@ -416,6 +416,8 @@ struct ib_device { struct ib_device_operations *op; /** Port number */ unsigned int port; + /** Total ports on device */ + unsigned int ports; /** Port open request counter */ unsigned int open_count; @@ -538,7 +540,6 @@ extern int ib_mcast_attach ( struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid ); extern void ib_mcast_detach ( struct ib_device *ibdev, struct ib_queue_pair *qp, union ib_gid *gid ); -extern int ib_count_ports ( struct ib_device *ibdev ); extern int ib_set_port_info ( struct ib_device *ibdev, union ib_mad *mad ); extern int ib_set_pkey_table ( struct ib_device *ibdev, union ib_mad *mad ); extern struct ib_device * alloc_ibdev ( size_t priv_size ); |