Direct Access Transport Library Functions datsrqcreate(3DAT)
NAME
datsrqcreate - create an instance of a shared receive
queue
SYNOPSIS
cc [ flag... ] file... -ldat [ library... ]
#include
DATRETURN
datsrqcreate (
IN DATIAHANDLE iahandle,
IN DATPZHANDLE pzhandle,
IN DATSRQATR *srqattr,
OUT DATSRQHANDLE *srqhandle
)
PARAMETERS
iahandle A handle for an open instance of the IA to
which the created SRQ belongs.
pzhandle A handle for an instance of the Protection
Zone.
srqattr A pointer to a structure that contains
Consumer-requested SRQ attributes.
srqhandle A handle for the created instance of a Shared
Receive Queue.
DESCRIPTION
The datsrqcreate() function creates an instance of a
Shared Receive Queue (SRQ) that is provided to the Consumer
as srqhandle. If the value of DATRETURN is not
DATSUCES, the value of srqhandle is not defined.
The created SRQ is unattached to any Endpoints.
The Protection Zone pzhandle allows Consumers to control
what local memory can be used for the Recv DTO buffers
posted to the SRQ. Only memory referred to by LMRs of the
posted Recv buffers that match the SRQ Protection Zone can
be accessed by the SRQ.
SunOS 5.11 Last change: 11 Sep 2006 1
Direct Access Transport Library Functions datsrqcreate(3DAT)
The srqattributes argument specifies the initial attributes
of the created SRQ. If the operation is successful, the
created SRQ will have the queue size at least maxrecvdtos
and the number of entries on the posted Recv scatter list of
at lease maxrecviov. The created SRQ can have the queue
size and support number of entries on post Recv buffers
larger than requested. Consumer can query SRQ to find out
the actual supported queue size and maximum Recv IOV.
The Consumer must set lowwatermark to DATSRQLWDEFAULT to
ensure that an asynchronous event will not be generated
immediately, since there are no buffers in the created SRQ.
The Consumer should set the Maximum Receive DTO attribute
and the Maximum number of elements in IOV for posted buffers
as needed.
When an associated EP tries to get a buffer from SRQ and
there are no buffers available, the behavior of the EP is
the same as when there are no buffers on the EP Recv Work
Queue.
RETURN VALUES
DATSUCES The operation was successful.
DATINSUFICIENTRESOURCES The operation failed due to
resource limitations.
DATINVALIDHANDLE Either iahandle or pzhandle
is an invalid DAT handle.
DATINVALIDPARAMETER One of the parameters is
invalid. Either one of the
requested SRQ attributes was
invalid or a combination of
attributes is invalid.
DATMODELNOTSUPORTED The requested Model was not
supported by the Provider.
USAGE
SRQ is created by the Consumer prior to creation of the EPs
that will be using it. Some Providers might restrict
whether multiple EPs that share a SRQ can have different
Protection Zones. Check the srqeppzdifferencesupport
Provider attribute. The EPs that use SRQ might or might not
SunOS 5.11 Last change: 11 Sep 2006 2
Direct Access Transport Library Functions datsrqcreate(3DAT)
use the same recvevd.
Since a Recv buffer of SRQ can be used by any EP that is
using SRQ, the Consumer should ensure that the posted Recv
buffers are large enough to receive an incoming message on
any of the EPs.
If Consumers do not want to receive an asynchronous event
when the number of buffers in SRQ falls below the Low Water-
mark, they should leave its value as DATSRQLWDEFAULT. If
Consumers do want to receive a notification, they can set
the value to the desired one by calling
datsrqsetlw(3DAT).
SRQ allows the Consumer to use fewer Recv buffers then post-
ing the maximum number of buffers for each connection. If
the Consumer can upper bound the number of incoming messages
over all connections whose local EP is using SRQ, then
instead of posting this maximum for each connection the Con-
sumer can post them for all connections on SRQ. For example,
the maximum utilized link bandwidth divided over the message
size can be used for an upper bound.
Depending on the underlying Transport, one or more messages
can arrive simultaneously on an EP that is using SRQ. Thus,
the same EP can have multiple Recv buffers in its possession
without these buffers being on SRQ or recvevd.
Since Recv buffers can be used by multiple connections of
the local EPs that are using SRQ, the completion order of
the Recv buffers is no longer guaranteed even when they use
of the same recvevd. For each connection the Recv buffers
completion order is guaranteed to be in the order of the
posted matching Sends to the other end of the connection.
There is no ordering guarantee that Receive buffers will be
returned in the order they were posted even if there is only
a single connection (Endpoint) associated with the SRQ.
There is no ordering guarantee between different connections
or between different recvevds.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 11 Sep 2006 3
Direct Access Transport Library Functions datsrqcreate(3DAT)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Standard: uDAPL, 1.2
MT-Level Safe
SEE ALSO
datsrqfree(3DAT), datsrqpostrecv(3DAT),
datsrqquery(3DAT), datsrqresize(3DAT),
datsrqsetlw(3DAT), libdat(3LIB), attributes(5)
SunOS 5.11 Last change: 11 Sep 2006 4
|