Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-08 Thread Stefano Stabellini
On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > On 03/08/2017 02:33 PM, Stefano Stabellini wrote: > > On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > > +} > > + > > +static int p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX > > size) > > +{ > > + RING_IDX cons,

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-08 Thread Stefano Stabellini
On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > On 03/08/2017 02:33 PM, Stefano Stabellini wrote: > > On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > > +} > > + > > +static int p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX > > size) > > +{ > > + RING_IDX cons,

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-08 Thread Boris Ostrovsky
>> There is no extra read of prod/cons. > Yes, there are: just after this if statement we would have to read them > again to calculate masked_prod and masked_cons. Ah, of course. Thanks. -boris

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-08 Thread Boris Ostrovsky
>> There is no extra read of prod/cons. > Yes, there are: just after this if statement we would have to read them > again to calculate masked_prod and masked_cons. Ah, of course. Thanks. -boris

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-08 Thread Boris Ostrovsky
On 03/08/2017 02:33 PM, Stefano Stabellini wrote: > On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > +} > + > +static int p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX > size) > +{ > + RING_IDX cons, prod; > + > + cons = ring->intf->out_cons; > + prod

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-08 Thread Boris Ostrovsky
On 03/08/2017 02:33 PM, Stefano Stabellini wrote: > On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > +} > + > +static int p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX > size) > +{ > + RING_IDX cons, prod; > + > + cons = ring->intf->out_cons; > + prod

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-08 Thread Stefano Stabellini
On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > >>> +} > >>> + > >>> +static int p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX > >>> size) > >>> +{ > >>> + RING_IDX cons, prod; > >>> + > >>> + cons = ring->intf->out_cons; > >>> + prod = ring->intf->out_prod; > >>> + mb(); > >>> + > >>>

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-08 Thread Stefano Stabellini
On Wed, 8 Mar 2017, Boris Ostrovsky wrote: > >>> +} > >>> + > >>> +static int p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX > >>> size) > >>> +{ > >>> + RING_IDX cons, prod; > >>> + > >>> + cons = ring->intf->out_cons; > >>> + prod = ring->intf->out_prod; > >>> + mb(); > >>> + > >>>

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-08 Thread Boris Ostrovsky
>>> +} >>> + >>> +static int p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX size) >>> +{ >>> + RING_IDX cons, prod; >>> + >>> + cons = ring->intf->out_cons; >>> + prod = ring->intf->out_prod; >>> + mb(); >>> + >>> + if (XEN_9PFS_RING_SIZE - xen_9pfs_queued(prod, cons, >>>

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-08 Thread Boris Ostrovsky
>>> +} >>> + >>> +static int p9_xen_write_todo(struct xen_9pfs_dataring *ring, RING_IDX size) >>> +{ >>> + RING_IDX cons, prod; >>> + >>> + cons = ring->intf->out_cons; >>> + prod = ring->intf->out_prod; >>> + mb(); >>> + >>> + if (XEN_9PFS_RING_SIZE - xen_9pfs_queued(prod, cons, >>>

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-07 Thread Stefano Stabellini
On Tue, 7 Mar 2017, Boris Ostrovsky wrote: > On 03/06/2017 03:01 PM, Stefano Stabellini wrote: > > Implement struct p9_trans_module create and close functions by looking > > at the available Xen 9pfs frontend-backend connections. We don't expect > > many frontend-backend connections, thus walking

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-07 Thread Stefano Stabellini
On Tue, 7 Mar 2017, Boris Ostrovsky wrote: > On 03/06/2017 03:01 PM, Stefano Stabellini wrote: > > Implement struct p9_trans_module create and close functions by looking > > at the available Xen 9pfs frontend-backend connections. We don't expect > > many frontend-backend connections, thus walking

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-07 Thread Boris Ostrovsky
On 03/06/2017 03:01 PM, Stefano Stabellini wrote: > Implement struct p9_trans_module create and close functions by looking > at the available Xen 9pfs frontend-backend connections. We don't expect > many frontend-backend connections, thus walking a list is OK. > > Send requests to the backend by

Re: [PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-07 Thread Boris Ostrovsky
On 03/06/2017 03:01 PM, Stefano Stabellini wrote: > Implement struct p9_trans_module create and close functions by looking > at the available Xen 9pfs frontend-backend connections. We don't expect > many frontend-backend connections, thus walking a list is OK. > > Send requests to the backend by

[PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-06 Thread Stefano Stabellini
Implement struct p9_trans_module create and close functions by looking at the available Xen 9pfs frontend-backend connections. We don't expect many frontend-backend connections, thus walking a list is OK. Send requests to the backend by copying each request to one of the available rings (each

[PATCH 5/7] xen/9pfs: send requests to the backend

2017-03-06 Thread Stefano Stabellini
Implement struct p9_trans_module create and close functions by looking at the available Xen 9pfs frontend-backend connections. We don't expect many frontend-backend connections, thus walking a list is OK. Send requests to the backend by copying each request to one of the available rings (each