Re: [Xen-devel] [PATCH 6/7] xen/9pfs: receive responses

2017-03-08 Thread Konrad Rzeszutek Wilk
On Tue, Mar 07, 2017 at 05:13:59PM -0800, Stefano Stabellini wrote: > On Tue, 7 Mar 2017, Stefano Stabellini wrote: > > > > + > > > > + ring = container_of(work, struct xen_9pfs_dataring, work); > > > > + priv = ring->priv; > > > > + > > > > + while (1) { > > > > + c

Re: [Xen-devel] [PATCH 6/7] xen/9pfs: receive responses

2017-03-08 Thread Stefano Stabellini
On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > >>> + > >>> + if (xen_9pfs_queued(prod, cons, XEN_9PFS_RING_SIZE) < > >>> sizeof(h)) { > >>> + notify_remote_via_irq(ring->irq); > >>> + return; > >>> + } > >>> + > >>> + masked_prod = xen_9pfs_mas

Re: [Xen-devel] [PATCH 6/7] xen/9pfs: receive responses

2017-03-08 Thread Boris Ostrovsky
> >>> + >>> + if (xen_9pfs_queued(prod, cons, XEN_9PFS_RING_SIZE) < >>> sizeof(h)) { >>> + notify_remote_via_irq(ring->irq); >>> + return; >>> + } >>> + >>> + masked_prod = xen_9pfs_mask(prod, XEN_9PFS_RING_SIZE); >>> + m

Re: [Xen-devel] [PATCH 6/7] xen/9pfs: receive responses

2017-03-07 Thread Stefano Stabellini
On Tue, 7 Mar 2017, Stefano Stabellini wrote: > > > + > > > + ring = container_of(work, struct xen_9pfs_dataring, work); > > > + priv = ring->priv; > > > + > > > + while (1) { > > > + cons = ring->intf->in_cons; > > > + prod = ring->intf->in_prod; > > > + rmb(); > > > > >

Re: [Xen-devel] [PATCH 6/7] xen/9pfs: receive responses

2017-03-07 Thread Stefano Stabellini
On Tue, 7 Mar 2017, Boris Ostrovsky wrote: > On 03/06/2017 03:01 PM, Stefano Stabellini wrote: > > Upon receiving a notification from the backend, schedule the > > p9_xen_response work_struct. p9_xen_response checks if any responses are > > available, if so, it reads them one by one, calling p9_cli

Re: [Xen-devel] [PATCH 6/7] xen/9pfs: receive responses

2017-03-07 Thread Boris Ostrovsky
On 03/06/2017 03:01 PM, Stefano Stabellini wrote: > Upon receiving a notification from the backend, schedule the > p9_xen_response work_struct. p9_xen_response checks if any responses are > available, if so, it reads them one by one, calling p9_client_cb to send > them up to the 9p layer (p9_client