Re: [Xen-devel] [PATCH v5 11/13] xen/pvcalls: implement poll command

2017-10-24 Thread Boris Ostrovsky
On 10/23/2017 07:06 PM, Stefano Stabellini wrote: > On Tue, 17 Oct 2017, Boris Ostrovsky wrote: >>> +static unsigned int pvcalls_front_poll_passive(struct file *file, >>> + struct pvcalls_bedata *bedata, >>> + struct

Re: [Xen-devel] [PATCH v5 11/13] xen/pvcalls: implement poll command

2017-10-23 Thread Stefano Stabellini
On Tue, 17 Oct 2017, Boris Ostrovsky wrote: > > +static unsigned int pvcalls_front_poll_passive(struct file *file, > > + struct pvcalls_bedata *bedata, > > + struct sock_mapping *map, > > +

Re: [Xen-devel] [PATCH v5 11/13] xen/pvcalls: implement poll command

2017-10-17 Thread Boris Ostrovsky
> > +static unsigned int pvcalls_front_poll_passive(struct file *file, > +struct pvcalls_bedata *bedata, > +struct sock_mapping *map, > +poll_table *wait) > +{ > +

[Xen-devel] [PATCH v5 11/13] xen/pvcalls: implement poll command

2017-10-06 Thread Stefano Stabellini
For active sockets, check the indexes and use the inflight_conn_req waitqueue to wait. For passive sockets if an accept is outstanding (PVCALLS_FLAG_ACCEPT_INFLIGHT), check if it has been answered by looking at bedata->rsp[req_id]. If so, return POLLIN. Otherwise use the inflight_accept_req waitq