Re: [Xen-devel] [PATCH v4 08/13] xen/pvcalls: implement accept command

2017-10-06 Thread Stefano Stabellini
On Thu, 21 Sep 2017, Boris Ostrovsky wrote: > > +int pvcalls_front_accept(struct socket *sock, struct socket *newsock, int > > flags) > > +{ > > + struct pvcalls_bedata *bedata; > > + struct sock_mapping *map; > > + struct sock_mapping *map2 = NULL; > > + struct xen_pvcalls_request *req; >

Re: [Xen-devel] [PATCH v4 08/13] xen/pvcalls: implement accept command

2017-09-21 Thread Boris Ostrovsky
+int pvcalls_front_accept(struct socket *sock, struct socket *newsock, int flags) +{ + struct pvcalls_bedata *bedata; + struct sock_mapping *map; + struct sock_mapping *map2 = NULL; + struct xen_pvcalls_request *req; + int notify, req_id, ret, evtchn, nonblock; +

[Xen-devel] [PATCH v4 08/13] xen/pvcalls: implement accept command

2017-09-15 Thread Stefano Stabellini
Introduce a waitqueue to allow only one outstanding accept command at any given time and to implement polling on the passive socket. Introduce a flags field to keep track of in-flight accept and poll commands. Send PVCALLS_ACCEPT to the backend. Allocate a new active socket. Make sure that only