diff options
| author | Michael Brown | 2016-03-01 10:41:11 +0100 |
|---|---|---|
| committer | Michael Brown | 2016-03-08 13:08:58 +0100 |
| commit | ff13eeb74711f1b775baf61d5836a322dffdf82c (patch) | |
| tree | cd2710dd9dde6cda0bb63b9ec525a151add9b3c5 /src/include | |
| parent | [infiniband] Avoid multiple calls to ib_cmrc_shutdown() (diff) | |
| download | ipxe-ff13eeb74711f1b775baf61d5836a322dffdf82c.tar.gz ipxe-ff13eeb74711f1b775baf61d5836a322dffdf82c.tar.xz ipxe-ff13eeb74711f1b775baf61d5836a322dffdf82c.zip | |
[infiniband] Add support for performing service record lookups
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/ib_mad.h | 20 | ||||
| -rw-r--r-- | src/include/ipxe/ib_service.h | 20 |
2 files changed, 39 insertions, 1 deletions
diff --git a/src/include/ipxe/ib_mad.h b/src/include/ipxe/ib_mad.h index 454eda1f5..96e460edd 100644 --- a/src/include/ipxe/ib_mad.h +++ b/src/include/ipxe/ib_mad.h @@ -219,8 +219,25 @@ struct ib_sa_hdr { uint32_t comp_mask[2]; } __attribute__ (( packed )); -#define IB_SA_ATTR_MC_MEMBER_REC 0x38 +#define IB_SA_ATTR_SERVICE_REC 0x31 #define IB_SA_ATTR_PATH_REC 0x35 +#define IB_SA_ATTR_MC_MEMBER_REC 0x38 + +struct ib_service_record { + uint64_t id; + union ib_gid gid; + uint16_t pkey; + uint16_t reserved; + uint32_t lease; + uint8_t key[16]; + char name[64]; + uint8_t data8[16]; + uint16_t data16[8]; + uint32_t data32[4]; + uint64_t data64[2]; +} __attribute__ (( packed )); + +#define IB_SA_SERVICE_REC_NAME (1<<6) struct ib_path_record { uint32_t reserved0[2]; @@ -278,6 +295,7 @@ struct ib_mc_member_record { #define IB_SA_MCMEMBER_REC_PROXY_JOIN (1<<17) union ib_sa_data { + struct ib_service_record service_record; struct ib_path_record path_record; struct ib_mc_member_record mc_member_record; } __attribute__ (( packed )); diff --git a/src/include/ipxe/ib_service.h b/src/include/ipxe/ib_service.h new file mode 100644 index 000000000..88afe4e65 --- /dev/null +++ b/src/include/ipxe/ib_service.h @@ -0,0 +1,20 @@ +#ifndef _IPXE_IB_SERVICE_H +#define _IPXE_IB_SERVICE_H + +/** @file + * + * Infiniband service records + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <ipxe/infiniband.h> +#include <ipxe/ib_mi.h> + +extern struct ib_mad_transaction * +ib_create_service_madx ( struct ib_device *ibdev, + struct ib_mad_interface *mi, const char *name, + struct ib_mad_transaction_operations *op ); + +#endif /* _IPXE_IB_SERVICE_H */ |
