Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup of linkage issues for non-Linux hosts
[palacios.git] / linux_module / iface-keyed-stream-user.h
index 865918a..85ab0e6 100644 (file)
@@ -7,7 +7,11 @@
  */
 
 
+// Issue a V3_VM_KSTREAM_USER_CONNECT on the VM to acquire an fd for the device
+
 // get size of pending request
+// Note that this is not the wrong ioctl - the connect ioctl applies to the VM device
+// the following ioctls apply to the FD returned by the connect
 #define V3_KSTREAM_REQUEST_SIZE_IOCTL  (11244+1)
 // get the pending request
 #define V3_KSTREAM_REQUEST_PULL_IOCTL  (11244+2)
@@ -20,6 +24,7 @@
 #define USER
 #endif
 
+
 struct palacios_user_keyed_stream_url {
     uint64_t len;
     char     url[0];  // len describes it
@@ -30,6 +35,10 @@ struct palacios_user_keyed_stream_url {
 // This structure is used for both requests (kernel->user)
 // and responses (user->kernel)
 //
+// for a readkey request, the buf contains the tag
+// for a readkey response, the buf contains the data
+// for a writekey request, the buf contains the data + key
+// for a writekey request, the buf contains nothing
 struct palacios_user_keyed_stream_op {
 
     uint64_t len; // total structure length (all)
@@ -43,13 +52,17 @@ struct palacios_user_keyed_stream_op {
 #define PALACIOS_KSTREAM_READ_KEY  6
 
     sint64_t xfer;      // total bytes read or written (request/response)
+                        // 
 
     void    *user_key;  // user tag for an open key (response)
 
     uint64_t buf_len;   // buffer len
-    char buf[0];        // expanded as needed (key or valye)
+    uint64_t data_off;  // offset of data within the buffer
+                        // 0..buffer_len-1 is tag
+                        // rest is data
+    char buf[0];        // expanded as needed (key or value)
 
-    // The buffer contains the key or the value
+    // The buffer contains the key or the value 
 };