com.ibm.net.rdma.jverbs.verbs
Class SendWorkRequest
- java.lang.Object
-
- com.ibm.net.rdma.jverbs.verbs.SendWorkRequest
-
public class SendWorkRequest extends java.lang.ObjectRepresent a send work request. Applications create work request and post them onto queue pairs for execution. Each work request is composed of several scatter gather elements, each of which referring to one single buffer. Referred from RDMA programming manual by mellanox.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classSendWorkRequest.OpcodeThe operation that this Work Request (WR) will perform.static classSendWorkRequest.RdmaSpecifies the remote buffer to be used in READ or WRITE operations.
-
Field Summary
Fields Modifier and Type Field and Description static intIBV_SEND_FENCEWorkRequest set with this flag will not be processed till prior posted RDMA read/write is complete.static intIBV_SEND_INLINEA flag to send data inline.static intIBV_SEND_SIGNALEDA flag to enable send completion signaling by generation of WorkCompletion.static intIBV_SEND_SOLICITEDA flag to mark this request as solicited.
-
Constructor Summary
Constructors Constructor and Description SendWorkRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description SendWorkRequest.OpcodegetOpcode()Returns the opcode of this work request.SendWorkRequest.RdmagetRdma()Gets the RDMA section of of this work request.intgetSendFlags()Gets the send flags for this work request.ScatterGatherElementgetSge(int index)Gets a specific scatter/gather element of this work request.intgetSgeCount()The number of scatter/gather elements in this work request.java.util.LinkedList<ScatterGatherElement>getSgeList()Gets the scatter/gather elements of this work request.longgetWorkRequestId()A unique identifier for this work request.voidsetOpcode(SendWorkRequest.Opcode opCode)Returns the opcode of this work request.voidsetSendFlags(int sendFlags)Sets the send flags for this work request.(ex) IBV_SEND_SIGNALED.voidsetSgeList(java.util.LinkedList<ScatterGatherElement> sgeList)Sets the scatter/gather elements of this work request.voidsetWorkRequestId(long workRequestId)Allows setting the work request identifier.
-
-
-
Field Detail
-
IBV_SEND_FENCE
public static final int IBV_SEND_FENCE
WorkRequest set with this flag will not be processed till prior posted RDMA read/write is complete.- See Also:
- Constant Field Values
-
IBV_SEND_INLINE
public static final int IBV_SEND_INLINE
A flag to send data inline.- See Also:
- Constant Field Values
-
IBV_SEND_SIGNALED
public static final int IBV_SEND_SIGNALED
A flag to enable send completion signaling by generation of WorkCompletion.- See Also:
- Constant Field Values
-
IBV_SEND_SOLICITED
public static final int IBV_SEND_SOLICITED
A flag to mark this request as solicited.- See Also:
- Constant Field Values
-
-
Method Detail
-
getOpcode
public SendWorkRequest.Opcode getOpcode()
Returns the opcode of this work request. An opCode can be either IBV_WR_RDMA_WRITE, IBV_WR_SEND, or IBV_WR_RDMA_READ.- Returns:
- the opCode
-
getRdma
public SendWorkRequest.Rdma getRdma()
Gets the RDMA section of of this work request. The RDMA part is required for one sided-operations such as IBV_WR_RDMA_WRITE, or IBV_WR_RDMA_READ.- Returns:
- the rdma
-
getSendFlags
public int getSendFlags()
Gets the send flags for this work request.- Returns:
- the sendFlags
-
getSge
public ScatterGatherElement getSge(int index)
Gets a specific scatter/gather element of this work request.- Returns:
- the sg element
-
getSgeCount
public int getSgeCount()
The number of scatter/gather elements in this work request.- Returns:
- the numSge
-
getSgeList
public java.util.LinkedList<ScatterGatherElement> getSgeList()
Gets the scatter/gather elements of this work request. Each scatter/gather element refers to one single buffer.- Returns:
- the sgeList
-
getWorkRequestId
public long getWorkRequestId()
A unique identifier for this work request. A subsequent completion event will have a matching id.- Returns:
- the workRequestId
-
setOpcode
public void setOpcode(SendWorkRequest.Opcode opCode)
Returns the opcode of this work request. A opcode can be either IBV_WR_RDMA_WRITE, IBV_WR_SEND, or IBV_WR_RDMA_READ.- Parameters:
opCode- the new opCode
-
setSendFlags
public void setSendFlags(int sendFlags)
Sets the send flags for this work request.(ex) IBV_SEND_SIGNALED. Multiple flags can be combined using |.- Parameters:
sendFlags- the new sendFlags
-
setSgeList
public void setSgeList(java.util.LinkedList<ScatterGatherElement> sgeList)
Sets the scatter/gather elements of this work request. Each scatter/gather element refers to one single buffer.- Parameters:
sgeList- the new sgeList
-
setWorkRequestId
public void setWorkRequestId(long workRequestId)
Allows setting the work request identifier. A subsequent completion event will have a matching id.- Parameters:
workRequestId- the new workRequestId
-
-