All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Stefano Stabellini <stefano@aporeto.com>
Cc: andr2000@gmail.com, xen-devel@lists.xenproject.org,
	wei.liu2@citrix.com, andrew.cooper3@citrix.com
Subject: Re: [DOC v4] Xen transport for 9pfs
Date: Fri, 10 Feb 2017 13:45:05 -0500	[thread overview]
Message-ID: <20170210184505.GD32459@char.us.ORACLE.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1702091729580.20549@sstabellini-ThinkPad-X260>

On Thu, Feb 09, 2017 at 05:31:46PM -0800, Stefano Stabellini wrote:
> On Wed, 8 Feb 2017, Konrad Rzeszutek Wilk wrote:
> > > ## Ring Setup
> > > 
> > > The shared page has the following layout:
> > > 
> > >     typedef uint32_t XEN_9PFS_RING_IDX;
> > > 
> > >     struct xen_9pfs_intf {
> > >     	XEN_9PFS_RING_IDX in_cons, in_prod;
> > >     	uint8_t pad[56];
> > >     	XEN_9PFS_RING_IDX out_cons, out_prod;
> > > 
> > >     	uint32_t ring_order;
> > >         /* this is an array of (1 << ring_order) elements */
> > >     	grant_ref_t ref[1];
> > >     };
> > > 
> > >     /* not actually C compliant (ring_order changes from ring to ring) */
> > >     struct ring_data {
> > >         char in[((1 << ring_order) << PAGE_SHIFT) / 2];
> > >         char out[((1 << ring_order) << PAGE_SHIFT) / 2];
> > >     };
> > > 
> > 
> > This is the same comment about the the PV Calls structure.
> > 
> > Would it make sense to add the 'in_events' and 'out_events'
> > as a notification mechanism?
> 
> As I wrote in the case of PV Calls, given that it's just an optimization
> and increases complexity, what if we add some padding right after
> 
>   XEN_9PFS_RING_IDX out_cons, out_prod;
> 
> so that if we want to add it in the future, we can just place there,
> instead of the first 4 bytes of the padding array?

Yeah. Padding makes me sleep easy at night :-)

> 
>     struct xen_9pfs_intf {
>     	XEN_9PFS_RING_IDX in_cons, in_prod;
>     	uint8_t pad[56];
>     	XEN_9PFS_RING_IDX out_cons, out_prod;
>     	uint8_t pad[56];
> 
>     	uint32_t ring_order;
>         /* this is an array of (1 << ring_order) elements */
>     	grant_ref_t ref[1];
>     };
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

      reply	other threads:[~2017-02-10 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 19:38 [DOC v4] Xen transport for 9pfs Stefano Stabellini
2017-02-08 19:20 ` Konrad Rzeszutek Wilk
2017-02-10  1:31   ` Stefano Stabellini
2017-02-10 18:45     ` Konrad Rzeszutek Wilk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170210184505.GD32459@char.us.ORACLE.com \
    --to=konrad.wilk@oracle.com \
    --cc=andr2000@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=stefano@aporeto.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.