Re: [Xen-devel] [PATCH v4 08/18] xen/pvcalls: implement connect command

2017-06-21 Thread Stefano Stabellini
On Tue, 20 Jun 2017, Boris Ostrovsky wrote: > >> + > >> static int pvcalls_back_connect(struct xenbus_device *dev, > >>struct xen_pvcalls_request *req) > >> { > >> + struct pvcalls_fedata *fedata; > >> + int ret = -EINVAL; > >> + struct socket *sock; > >> + struct

Re: [Xen-devel] [PATCH v4 08/18] xen/pvcalls: implement connect command

2017-06-21 Thread Stefano Stabellini
On Tue, 20 Jun 2017, Boris Ostrovsky wrote: > On 06/15/2017 03:09 PM, Stefano Stabellini wrote: > > Allocate a socket. Keep track of socket <-> ring mappings with a new data > > structure, called sock_mapping. Implement the connect command by calling > > inet_stream_connect, and mapping the new ind

Re: [Xen-devel] [PATCH v4 08/18] xen/pvcalls: implement connect command

2017-06-20 Thread Boris Ostrovsky
On 06/15/2017 03:09 PM, Stefano Stabellini wrote: > Allocate a socket. Keep track of socket <-> ring mappings with a new data > structure, called sock_mapping. Implement the connect command by calling > inet_stream_connect, and mapping the new indexes page and data ring. > Allocate a workqueue and

Re: [Xen-devel] [PATCH v4 08/18] xen/pvcalls: implement connect command

2017-06-20 Thread Boris Ostrovsky
>> + >> static int pvcalls_back_connect(struct xenbus_device *dev, >> struct xen_pvcalls_request *req) >> { >> +struct pvcalls_fedata *fedata; >> +int ret = -EINVAL; >> +struct socket *sock; >> +struct sock_mapping *map; >> +struct xen_pvcalls_res

[Xen-devel] [PATCH v4 08/18] xen/pvcalls: implement connect command

2017-06-15 Thread Stefano Stabellini
Allocate a socket. Keep track of socket <-> ring mappings with a new data structure, called sock_mapping. Implement the connect command by calling inet_stream_connect, and mapping the new indexes page and data ring. Allocate a workqueue and a work_struct, called ioworker, to perform reads and write