Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-10-06 Thread Stefano Stabellini
On Wed, 20 Sep 2017, Boris Ostrovsky wrote: > > static int pvcalls_front_remove(struct xenbus_device *dev) > > { > > + struct pvcalls_bedata *bedata; > > + struct sock_mapping *map = NULL, *n; > > + > > + bedata = dev_get_drvdata(_front_dev->dev); > > + dev_set_drvdata(>dev, NULL); > > +

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-10-06 Thread Stefano Stabellini
On Wed, 20 Sep 2017, Boris Ostrovsky wrote: > > static int pvcalls_front_remove(struct xenbus_device *dev) > > { > > + struct pvcalls_bedata *bedata; > > + struct sock_mapping *map = NULL, *n; > > + > > + bedata = dev_get_drvdata(_front_dev->dev); > > + dev_set_drvdata(>dev, NULL); > > +

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-10-06 Thread Boris Ostrovsky
On 10/06/2017 04:29 PM, Stefano Stabellini wrote: > On Fri, 6 Oct 2017, Boris Ostrovsky wrote: >> On 10/06/2017 01:51 PM, Stefano Stabellini wrote: >>> On Wed, 20 Sep 2017, Boris Ostrovsky wrote: > + > +struct pvcalls_bedata { > + struct xen_pvcalls_front_ring ring; > + grant_ref_t

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-10-06 Thread Boris Ostrovsky
On 10/06/2017 04:29 PM, Stefano Stabellini wrote: > On Fri, 6 Oct 2017, Boris Ostrovsky wrote: >> On 10/06/2017 01:51 PM, Stefano Stabellini wrote: >>> On Wed, 20 Sep 2017, Boris Ostrovsky wrote: > + > +struct pvcalls_bedata { > + struct xen_pvcalls_front_ring ring; > + grant_ref_t

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-10-06 Thread Stefano Stabellini
On Fri, 6 Oct 2017, Boris Ostrovsky wrote: > On 10/06/2017 01:51 PM, Stefano Stabellini wrote: > > On Wed, 20 Sep 2017, Boris Ostrovsky wrote: > >>> + > >>> +struct pvcalls_bedata { > >>> + struct xen_pvcalls_front_ring ring; > >>> + grant_ref_t ref; > >>> + int irq; > >>> + > >>> + struct

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-10-06 Thread Stefano Stabellini
On Fri, 6 Oct 2017, Boris Ostrovsky wrote: > On 10/06/2017 01:51 PM, Stefano Stabellini wrote: > > On Wed, 20 Sep 2017, Boris Ostrovsky wrote: > >>> + > >>> +struct pvcalls_bedata { > >>> + struct xen_pvcalls_front_ring ring; > >>> + grant_ref_t ref; > >>> + int irq; > >>> + > >>> + struct

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-10-06 Thread Boris Ostrovsky
On 10/06/2017 01:51 PM, Stefano Stabellini wrote: > On Wed, 20 Sep 2017, Boris Ostrovsky wrote: >>> + >>> +struct pvcalls_bedata { >>> + struct xen_pvcalls_front_ring ring; >>> + grant_ref_t ref; >>> + int irq; >>> + >>> + struct list_head socket_mappings; >>> + struct list_head

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-10-06 Thread Boris Ostrovsky
On 10/06/2017 01:51 PM, Stefano Stabellini wrote: > On Wed, 20 Sep 2017, Boris Ostrovsky wrote: >>> + >>> +struct pvcalls_bedata { >>> + struct xen_pvcalls_front_ring ring; >>> + grant_ref_t ref; >>> + int irq; >>> + >>> + struct list_head socket_mappings; >>> + struct list_head

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-10-06 Thread Stefano Stabellini
On Wed, 20 Sep 2017, Boris Ostrovsky wrote: > > + > > +struct pvcalls_bedata { > > + struct xen_pvcalls_front_ring ring; > > + grant_ref_t ref; > > + int irq; > > + > > + struct list_head socket_mappings; > > + struct list_head socketpass_mappings; > > + spinlock_t socket_lock; > > + >

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-10-06 Thread Stefano Stabellini
On Wed, 20 Sep 2017, Boris Ostrovsky wrote: > > + > > +struct pvcalls_bedata { > > + struct xen_pvcalls_front_ring ring; > > + grant_ref_t ref; > > + int irq; > > + > > + struct list_head socket_mappings; > > + struct list_head socketpass_mappings; > > + spinlock_t socket_lock; > > + >

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-09-20 Thread Boris Ostrovsky
> > static int pvcalls_front_remove(struct xenbus_device *dev) > { > + struct pvcalls_bedata *bedata; > + struct sock_mapping *map = NULL, *n; > + > + bedata = dev_get_drvdata(_front_dev->dev); > + dev_set_drvdata(>dev, NULL); > + pvcalls_front_dev = NULL; One more

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-09-20 Thread Boris Ostrovsky
> > static int pvcalls_front_remove(struct xenbus_device *dev) > { > + struct pvcalls_bedata *bedata; > + struct sock_mapping *map = NULL, *n; > + > + bedata = dev_get_drvdata(_front_dev->dev); > + dev_set_drvdata(>dev, NULL); > + pvcalls_front_dev = NULL; One more

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-09-20 Thread Boris Ostrovsky
> + > +struct pvcalls_bedata { > + struct xen_pvcalls_front_ring ring; > + grant_ref_t ref; > + int irq; > + > + struct list_head socket_mappings; > + struct list_head socketpass_mappings; > + spinlock_t socket_lock; > + > + wait_queue_head_t inflight_req; > +

Re: [PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-09-20 Thread Boris Ostrovsky
> + > +struct pvcalls_bedata { > + struct xen_pvcalls_front_ring ring; > + grant_ref_t ref; > + int irq; > + > + struct list_head socket_mappings; > + struct list_head socketpass_mappings; > + spinlock_t socket_lock; > + > + wait_queue_head_t inflight_req; > +

[PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-09-15 Thread Stefano Stabellini
Introduce a data structure named pvcalls_bedata. It contains pointers to the command ring, the event channel, a list of active sockets and a list of passive sockets. Lists accesses are protected by a spin_lock. Introduce a waitqueue to allow waiting for a response on commands sent to the backend.

[PATCH v4 02/13] xen/pvcalls: implement frontend disconnect

2017-09-15 Thread Stefano Stabellini
Introduce a data structure named pvcalls_bedata. It contains pointers to the command ring, the event channel, a list of active sockets and a list of passive sockets. Lists accesses are protected by a spin_lock. Introduce a waitqueue to allow waiting for a response on commands sent to the backend.