Hi All!

On Tue, Jan 20, 2015 at 2:47 PM, Roger Pau Monné <roger....@citrix.com>
wrote:

> Hello,
>
> I should probably have done this earlier because I've been aware of this
> issue for a long time (since I've started dealing with the PV blk
> protocol).
>
> The current way to describe PV protocols in Xen is very inefficient
> IMHO. Using C structs as "the description" of a binary protocol seems
> very wrong, specially taking into account that different ABIs can
> generate different layouts for the same C struct. This is for example a
> problem in the PV blk protocol, since the binary layout of the
> structures change depending on the bitness.
>
> In order to avoid this, I would like to request that any new PV protocol
> that's added to Xen be described in binary terms, just like it's
> normally done with other protocols. As a reference see for example the
> following section from the TCP RFC:
>
> http://tools.ietf.org/html/rfc793#page-15


Guys, what do you think about using an Interface Description Language such
as Google Protocol Buffers or something like?

With best regards,


> I think this is both more easy to understand and removes the bitness
> problem of using C structs.
>
> Then each user of this protocol could define it's own set of structures
> that would map to the binary layout, which should be almost trivial.
> There would be no problem with using __packed or similar gcc'isms as
> each implementation could choose the more convenient way to represent
> this layout internally.
>
> Roger.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>



-- 
*Vitaly Chernooky | Senior Developer - Product Engineering and Development*
GlobalLogic
P *+380.44.4929695 ext.1136* M *+380.98.7920568* S cvv_2k
www.globallogic.com

http://www.globallogic.com/email_disclaimer.txt
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to