X-Git-Url: http://git.etherboot.org/mirror/scst/.git/blobdiff_plain/967b64a4ccaef45f295ebd9dcdb7f53c91947a3e..a029c51ead5c314e9ed2f4fe60e1bb4f8962cfec:/srpt/src/ib_dm_mad.h diff --git a/srpt/src/ib_dm_mad.h b/srpt/src/ib_dm_mad.h index fc36591..83a0506 100644 --- a/srpt/src/ib_dm_mad.h +++ b/srpt/src/ib_dm_mad.h @@ -39,11 +39,21 @@ #include enum { + /* + * See also section 13.4.7 Status Field, table 115 MAD Common Status + * Field Bit Values and also section 16.3.1.1 Status Field in the + * InfiniBand Architecture Specification. + */ DM_MAD_STATUS_UNSUP_METHOD = 0x0008, DM_MAD_STATUS_UNSUP_METHOD_ATTR = 0x000c, DM_MAD_STATUS_INVALID_FIELD = 0x001c, DM_MAD_STATUS_NO_IOC = 0x0100, + /* + * See also the Device Management chapter, section 16.3.3 Attributes, + * table 279 Device Management Attributes in the InfiniBand + * Architecture Specification. + */ DM_ATTR_CLASS_PORT_INFO = 0x01, DM_ATTR_IOU_INFO = 0x10, DM_ATTR_IOC_PROFILE = 0x11, @@ -54,6 +64,17 @@ struct ib_dm_hdr { u8 reserved[28]; }; +/* + * Structure of management datagram sent by the SRP target implementation. + * Contains a management datagram header, reliable multi-packet transaction + * protocol (RMPP) header and ib_dm_hdr. Notes: + * - The SRP target implementation does not use RMPP or ib_dm_hdr when sending + * management datagrams. + * - The header size must be exactly 64 bytes (IB_MGMT_DEVICE_HDR), since this + * is the header size that is passed to ib_create_send_mad() in ib_srpt.c. + * - The maximum supported size for a management datagram when not using RMPP + * is 256 bytes -- 64 bytes header and 192 (IB_MGMT_DEVICE_DATA) bytes data. + */ struct ib_dm_mad { struct ib_mad_hdr mad_hdr; struct ib_rmpp_hdr rmpp_hdr; @@ -61,6 +82,10 @@ struct ib_dm_mad { u8 data[IB_MGMT_DEVICE_DATA]; }; +/* + * IOUnitInfo as defined in section 16.3.3.3 IOUnitInfo of the InfiniBand + * Architecture Specification. + */ struct ib_dm_iou_info { __be16 change_id; u8 max_controllers; @@ -68,6 +93,10 @@ struct ib_dm_iou_info { u8 controller_list[128]; }; +/* + * IOControllerprofile as defined in section 16.3.3.4 IOControllerProfile of + * the InfiniBand Architecture Specification. + */ struct ib_dm_ioc_profile { __be64 guid; __be32 vendor_id; @@ -99,6 +128,10 @@ struct ib_dm_svc_entry { u64 id; }; +/* + * See also section 16.3.3.5 ServiceEntries in the InfiniBand Architecture + * Specification. See also section B.7, table B.8 in the T10 SRP r16a document. + */ struct ib_dm_svc_entries { struct ib_dm_svc_entry service_entries[4]; };