From: Sean Hefty Date: Sun, 21 Oct 2012 06:43:13 +0000 (-0700) Subject: rsocket: Expand definition of target SGE X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=7a07c80f2242e80c076dcf3ec6bb4c94626b284f;p=~shefty%2Flibrdmacm.git rsocket: Expand definition of target SGE 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 --- diff --git a/src/rsocket.c b/src/rsocket.c index 6bfbed67..fd31dfac 100644 --- a/src/rsocket.c +++ b/src/rsocket.c @@ -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;