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

2017-05-18 Thread Boris Ostrovsky
On 05/18/2017 03:10 PM, Stefano Stabellini wrote: > On Tue, 16 May 2017, Boris Ostrovsky wrote: > + ret = xenbus_map_ring_valloc(dev, &req->u.connect.ref, 1, &page); > + if (ret < 0) { > + sock_release(map->sock); > + kfree(map); > + goto out; > + } >

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

2017-05-18 Thread Stefano Stabellini
On Tue, 16 May 2017, Boris Ostrovsky wrote: > >>> + ret = xenbus_map_ring_valloc(dev, &req->u.connect.ref, 1, &page); > >>> + if (ret < 0) { > >>> + sock_release(map->sock); > >>> + kfree(map); > >>> + goto out; > >>> + } > >>> + map->ring = page; > >>> + map->ring_order = m

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

2017-05-16 Thread Boris Ostrovsky
>>> + ret = xenbus_map_ring_valloc(dev, &req->u.connect.ref, 1, &page); >>> + if (ret < 0) { >>> + sock_release(map->sock); >>> + kfree(map); >>> + goto out; >>> + } >>> + map->ring = page; >>> + map->ring_order = map->ring->ring_order; >>> + /* first read

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

2017-05-16 Thread Stefano Stabellini
On Mon, 15 May 2017, Boris Ostrovsky wrote: > On 05/15/2017 04:36 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 08/18] xen/pvcalls: implement connect command

2017-05-15 Thread Boris Ostrovsky
On 05/15/2017 04:36 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. Associate the socket to an io

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

2017-05-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. Associate the socket to an ioworker randomly. When an active socket is closed (sk_