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>
#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;