Re: [Xen-devel] [PATCH v4 10/13] xen/pvcalls: implement recvmsg

2017-10-06 Thread Stefano Stabellini
On Fri, 22 Sep 2017, Boris Ostrovsky wrote: > > +static bool pvcalls_front_read_todo(struct sock_mapping *map) > > +{ > > + struct pvcalls_data_intf *intf = map->active.ring; > > + RING_IDX cons, prod; > > + int32_t error; > > + > > + cons = intf->in_cons; > > + prod = intf->in_prod; > >

Re: [Xen-devel] [PATCH v4 10/13] xen/pvcalls: implement recvmsg

2017-09-22 Thread Boris Ostrovsky
> > +static bool pvcalls_front_read_todo(struct sock_mapping *map) > +{ > + struct pvcalls_data_intf *intf = map->active.ring; > + RING_IDX cons, prod; > + int32_t error; > + > + cons = intf->in_cons; > + prod = intf->in_prod; > + error = intf->in_error; > + return

[Xen-devel] [PATCH v4 10/13] xen/pvcalls: implement recvmsg

2017-09-15 Thread Stefano Stabellini
Implement recvmsg by copying data from the "in" ring. If not enough data is available and the recvmsg call is blocking, then wait on the inflight_conn_req waitqueue. Take the active socket in_mutex so that only one function can access the ring at any given time. Signed-off-by: Stefano Stabellini