]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
rsocket: Expand definition of target SGE
authorSean Hefty <sean.hefty@intel.com>
Sun, 21 Oct 2012 06:43:13 +0000 (23:43 -0700)
committerSean Hefty <sean.hefty@intel.com>
Sun, 21 Oct 2012 06:43:13 +0000 (23:43 -0700)
During connection establishment, rsocket exchanges a
target SGE.  The target SGE contains the address, rkey,
and length of the target SGL.  The target SGL is the
location where rsocket publishes data buffers at the
remote peer.

The length contained in the target SGE is the number of
entries in the target SGL, which is currently set to 2.
Divide the length field into 3 separate values.

bits 31:16 - reserved
bits 15:8  - use for direct data placement algorithm
bits 7:0   - use for target SGL size

Bits 15 and 7 are used as scaling factors.  If set, then
the size specified in the corresponding lower bits is
multiplied by 128.

Backwards compatibility is maintained, since we never use
a value greater than 2 anyway.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
src/rsocket.c

index 6bfbed673c3a2a02f986042e6e6eb9db15c62130..fd31dfaccfa2970d774cb049551c3f93f640010d 100644 (file)
@@ -124,6 +124,15 @@ struct rs_sge {
 #define rs_host_is_net() (1 == htonl(1))
 #define RS_CONN_FLAG_NET 1
 
+/*
+ * target_sgl:
+ *    addr   - Remote address to published target buffers
+ *    key    - Rkey of remote address for RDMA writes
+ *    length - Specifies sizes of target SGL areas
+ *             bits 31:16 - reserved
+ *             bits 15:8  - number of direct data placement target entries
+ *             bits  7:0  - number of network buffer target entries
+ */
 struct rs_conn_data {
        uint8_t           version;
        uint8_t           flags;