From 6b4cc5f71e266aadeee085a1fdf1a877e4ec4483 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 24 Oct 2012 11:02:12 -0700 Subject: [PATCH] refresh (create temporary patch) --- meta | 5 +- patches/refresh-temp | 118 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 patches/refresh-temp diff --git a/meta b/meta index ce6a6319..5913593b 100644 --- a/meta +++ b/meta @@ -1,8 +1,9 @@ Version: 1 -Previous: 89458119ae3a6051ed49ee7df911eb2f9effbc80 -Head: aa5ec58a7c5a4849b45c9e97f319cd6cfcca3d06 +Previous: 578ed148d2c1ae4bd63865722d0cbb954247c247 +Head: b8def33f803bdfba5a07e11f7989f739a1e829f2 Applied: rs-iomap: aa5ec58a7c5a4849b45c9e97f319cd6cfcca3d06 + refresh-temp: b8def33f803bdfba5a07e11f7989f739a1e829f2 Unapplied: riostream: b833a6940dd0b3a4ce3f0d8fe4ddc6d145cc4c68 resv-rs-len: 7b6ff5c4894f54b221d877adcd709795dffb2fe9 diff --git a/patches/refresh-temp b/patches/refresh-temp new file mode 100644 index 00000000..75a34106 --- /dev/null +++ b/patches/refresh-temp @@ -0,0 +1,118 @@ +Bottom: f5779eb35742a3071e97dd98c5f5d30f75687733 +Top: 93fea4a0133ee9be5198c904501a510e1624c0d0 +Author: Sean Hefty +Date: 2012-10-24 11:02:12 -0700 + +Refresh of rs-iomap + +--- + +diff --git a/docs/rsocket b/docs/rsocket +index 5399f6c..1484f65 100644 +--- a/docs/rsocket ++++ b/docs/rsocket +@@ -110,11 +110,11 @@ Bits Message Meaning of + 31:29 Type Bits 28:0 + 000 Data Transfer bytes transfered + 001 reserved +-010 reserved ++010 reserved - used internally, available for future use + 011 reserved + 100 Credit Update received credits granted + 101 reserved +-110 reserved ++110 Iomap Updated index of updated entry + 111 Control control message type + + Data Transfer +@@ -133,6 +133,12 @@ care not to modify a remote target SGL while it may be in use. This is done + by tracking when a receive buffer referenced by a remote target SGL has been + filled. + ++Iomap Updated ++Used to indicate that a remote iomap entry was updated. The updated entry ++contains the offset value associated with an address, length, and rkey. Once ++an iomap has been updated, the local application can issue directed IO ++transfers against the corresponding remote buffer. ++ + Control Message - DISCONNECT + Indicates that the rsocket connection has been fully disconnected and will no + longer send or receive data. Data received before the disconnect message was +@@ -142,3 +148,44 @@ Control Message - SHUTDOWN + Indicates that the remote rsocket has shutdown the send side of its + connection. The recipient of a shutdown message will no longer accept + incoming data, but may still transfer outbound data. ++ ++ ++Iomapped Buffers ++---------------- ++Rsockets allows for zero-copy transfers using what it refers to as iomapped ++buffers. Iomapping and direct data placement (zero-copy) transfers are done ++using rsocket specific extensions. The general operation is similar to ++that used for normal data transfers described above. ++ ++ host A host B ++ remote iomap ++ target iomap <----------- [ ] ++ [ ] ------ ++ [ ] -- ------ iomapped buffer(s) ++ -- -----> +--+ ++ -- | | ++ -- | | ++ -- | | ++ -- +--+ ++ -- ++ ---> +--+ ++ | | ++ | | ++ +--+ ++ ++The remote iomap contains the address, size, and rkey of the target iomap. As ++the applicaton maps buffers host B to a given rsocket, rsockets will issue an RDMA ++write against one of the entries in the target iomap on host A. The ++updated entry will reference an available iomapped buffer. Immediate data ++included with the RDMA write will indicate to host A that a target iomap ++has been updated. ++ ++When host A wishes to transfer directly into an iomapped buffer, it will check ++its target iomap for an offset corresponding to a remotely mapped buffer. A ++matching iomap entry will contain the address, size, and rkey of the target ++buffer on host B. Host A will then issue an RDMA operation against the ++registered remote data buffer. ++ ++From host A's perspective, the transfer appears as a normal send/write ++operation, with the data stream redirected directly into the receiving ++application's buffer. +diff --git a/man/rsocket.7 b/man/rsocket.7 +index 6a9ea95..a1171fd 100644 +--- a/man/rsocket.7 ++++ b/man/rsocket.7 +@@ -73,7 +73,14 @@ size_t riowrite(int socket, const void *buf, size_t count, off_t offset, int fla + .TP + Riowrite allows an application to transfer data over an rsocket + directly into a remotely iomapped buffer. The remote buffer is specified +-through an offset parameter, which corresponds to a remote iomapped buffer. ++through an offset parameter, which corresponds to a remote iomapped buffer. ++From the sender's perspective, riowrite behaves similar to rwrite. From ++a receiver's view, riowrite transfers are silently redirected into a pre- ++determined data buffer. Data is received automatically, and the receiver ++is not informed of the transfer. However, iowrite data is still considered ++part of the data stream, such that iowrite data will be written before a ++subsequent transfer is received. A message sent immediately after initiating ++an iowrite may be used to notify the receiver of the iowrite. + .P + In addition to standard socket options, rsockets supports options + specific to RDMA devices and protocols. These options are accessible +diff --git a/src/rsocket.c b/src/rsocket.c +index 0173555..c534c61 100644 +--- a/src/rsocket.c ++++ b/src/rsocket.c +@@ -89,7 +89,7 @@ static uint32_t polling_time = 10; + enum { + RS_OP_DATA, + RS_OP_RSVD_DATA_MORE, +- RS_OP_WRITE, ++ RS_OP_WRITE, /* opcode is not transmitted over the network */ + RS_OP_RSVD_DRA_MORE, + RS_OP_SGL, + RS_OP_RSVD, -- 2.46.0