All of lore.kernel.org
 help / color / mirror / Atom feed
* Guidelines for new PV protocol submission
@ 2015-01-20 12:47 Roger Pau Monné
  2015-01-20 13:20 ` David Vrabel
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Roger Pau Monné @ 2015-01-20 12:47 UTC (permalink / raw)
  To: xen-devel
  Cc: oleksandr.dmytryshyn, Ian Jackson, Ian Campbell, Jan Beulich,
	Stefano Stabellini

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

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.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-02-09 13:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 12:47 Guidelines for new PV protocol submission Roger Pau Monné
2015-01-20 13:20 ` David Vrabel
2015-01-20 13:39   ` Andrew Cooper
2015-01-20 13:48     ` Jan Beulich
2015-01-20 14:00       ` Andrew Cooper
2015-01-20 16:32         ` Jan Beulich
2015-01-20 14:21       ` Ian Jackson
2015-01-20 16:28         ` Ian Campbell
2015-01-20 13:46 ` Jan Beulich
2015-02-05 10:42 ` Ian Campbell
2015-02-09 11:01   ` Roger Pau Monné
2015-02-09 11:11     ` Ian Campbell
2015-02-09 11:59 ` Vitaly Chernooky
2015-02-09 13:15   ` Ian Campbell
2015-02-09 13:45     ` Vitaly Chernooky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.