udi_xfer_constraints_t(3udi)
Transfer constraints structure
#include <udi.h>typedef struct { udi_ubit32_t udi_xfer_max; udi_ubit32_t udi_xfer_typical; udi_ubit32_t udi_xfer_granularity; udi_boolean_t udi_xfer_one_piece; udi_boolean_t udi_xfer_exact_size; udi_boolean_t udi_xfer_no_reorder; } udi_xfer_constraints_t;MEMBERS udi_xfer_max is the maximum # of bytes for an I/O transfer that can be supported by the device and/or driver. Zero indicates that there is no restriction on transfer size.
udi_xfer_typical is the typical # of bytes for an I/O transfer to this device. This value may be used by the environment to optimize pre-allocation decisions. Zero indicates that the device has no typical pattern. Only drivers that do have a typical pattern should set this attribute. This constraint is typically used to assist the environment in implementing pre-allocation strategies.
udi_xfer_granularity is the transfer granularity. The total transfer size must be a multiple of this number of bytes. For random access devices, it is also required that the starting device offset for a transfer must be a multiple of the transfer granularity. A value of one effectively means no restriction. Transfer size is a function of metalanguage-specific operations, and may or may not be related to the size of buffers used to pass the data.
udi_xfer_one_piece is a flag indicating (if TRUE) that the transfer must be handled as a single request; it cannot be broken up. This is typically used for drivers that use the transfer size as an implicit attribute; for example, a tape driver might use the transfer size to control the size of the block written to a tape. Also acts as if UDI_XFER_EXACT_SIZE were TRUE.
udi_xfer_exact_size is a flag indicating (if TRUE) that transfer requests that don't conform to transfer granularity constraints must be failed instead of being passed to the driver. Even if this flag is not set, the request that is passed to the driver will still meet the transfer granularity constraints, but it may have been modified from the original request in order to do so (using a blocking/de-blocking algorithm).
udi_xfer_no_reorder is a flag indicating (if TRUE) that transfer requests must be passed to the driver in FIFO order. Any fine-grained breakup into smaller requests must also preserve ascending device offset order and must not insert new requests into the stream.
DESCRIPTION The udi_xfer_constraints_t structure is used to describe the various transfer constraints for a specific operation. These transfer constraints may be passed to a child via a metalanguage-specific bind acknowledgement channel operation to communicate the transfer requirements to the child driver; a metalanguage may alternatively explicitly specify an applicable subset of these constraints in a manner unique to that metalanguage.
The transfer constraints information may be used by a driver to determine how to divide requests into appropriate individual control blocks and buffers for handling by the parent driver.