X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-keyed-stream-user.h;h=85ab0e619faea4030b3c67a9aecf2c5e1f8600f5;hb=2cb41f7db5b9f89113432d6b3daff4807ba8e5f2;hp=865918abfb29341189145a820b35a6782f05fdc3;hpb=1c4d4772663c7bb6ddf78db445a27b92c58b8fad;p=palacios.git diff --git a/linux_module/iface-keyed-stream-user.h b/linux_module/iface-keyed-stream-user.h index 865918a..85ab0e6 100644 --- a/linux_module/iface-keyed-stream-user.h +++ b/linux_module/iface-keyed-stream-user.h @@ -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 };