Re: [PATCH v5 09/13] xen/pvcalls: implement sendmsg

2017-10-20 Thread Boris Ostrovsky
On 10/19/2017 09:41 PM, Stefano Stabellini wrote: > On Tue, 17 Oct 2017, Boris Ostrovsky wrote: >>> +static int __write_ring(struct pvcalls_data_intf *intf, >>> + struct pvcalls_data *data, >>> + struct iov_iter *msg_iter, >>> + int len) >>> +{

Re: [PATCH v5 09/13] xen/pvcalls: implement sendmsg

2017-10-19 Thread Stefano Stabellini
On Tue, 17 Oct 2017, Boris Ostrovsky wrote: > > +static int __write_ring(struct pvcalls_data_intf *intf, > > + struct pvcalls_data *data, > > + struct iov_iter *msg_iter, > > + int len) > > +{ > > + RING_IDX cons, prod, size, masked_prod, mask

Re: [PATCH v5 09/13] xen/pvcalls: implement sendmsg

2017-10-17 Thread Boris Ostrovsky
> +static int __write_ring(struct pvcalls_data_intf *intf, > + struct pvcalls_data *data, > + struct iov_iter *msg_iter, > + int len) > +{ > + RING_IDX cons, prod, size, masked_prod, masked_cons; > + RING_IDX array_size = XEN_FLEX

[PATCH v5 09/13] xen/pvcalls: implement sendmsg

2017-10-06 Thread Stefano Stabellini
Send data to an active socket by copying data to the "out" ring. Take the active socket out_mutex so that only one function can access the ring at any given time. If not enough room is available on the ring, rather than returning immediately or sleep-waiting, spin for up to 5000 cycles. This small