Re: [PATCH v2 11/18] xen/pvcalls: implement accept command

2017-06-02 Thread Stefano Stabellini
On Fri, 26 May 2017, Boris Ostrovsky wrote: > > static void __pvcalls_back_accept(struct work_struct *work) > > { > > + struct sockpass_mapping *mappass = container_of( > > + work, struct sockpass_mapping, register_work); > > + struct sock_mapping *map; > > + struct

Re: [PATCH v2 11/18] xen/pvcalls: implement accept command

2017-06-02 Thread Stefano Stabellini
On Fri, 26 May 2017, Boris Ostrovsky wrote: > > static void __pvcalls_back_accept(struct work_struct *work) > > { > > + struct sockpass_mapping *mappass = container_of( > > + work, struct sockpass_mapping, register_work); > > + struct sock_mapping *map; > > + struct

Re: [PATCH v2 11/18] xen/pvcalls: implement accept command

2017-05-26 Thread Boris Ostrovsky
> static void __pvcalls_back_accept(struct work_struct *work) > { > + struct sockpass_mapping *mappass = container_of( > + work, struct sockpass_mapping, register_work); > + struct sock_mapping *map; > + struct pvcalls_ioworker *iow; > + struct pvcalls_back_priv

Re: [PATCH v2 11/18] xen/pvcalls: implement accept command

2017-05-26 Thread Boris Ostrovsky
> static void __pvcalls_back_accept(struct work_struct *work) > { > + struct sockpass_mapping *mappass = container_of( > + work, struct sockpass_mapping, register_work); > + struct sock_mapping *map; > + struct pvcalls_ioworker *iow; > + struct pvcalls_back_priv

[PATCH v2 11/18] xen/pvcalls: implement accept command

2017-05-19 Thread Stefano Stabellini
Implement the accept command by calling inet_accept. To avoid blocking in the kernel, call inet_accept(O_NONBLOCK) from a workqueue, which get scheduled on sk_data_ready (for a passive socket, it means that there are connections to accept). Use the reqcopy field to store the request. Accept the

[PATCH v2 11/18] xen/pvcalls: implement accept command

2017-05-19 Thread Stefano Stabellini
Implement the accept command by calling inet_accept. To avoid blocking in the kernel, call inet_accept(O_NONBLOCK) from a workqueue, which get scheduled on sk_data_ready (for a passive socket, it means that there are connections to accept). Use the reqcopy field to store the request. Accept the