From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Stefano Stabellini <sstabellini@kernel.org>, xen-devel@lists.xen.org
Cc: linux-kernel@vger.kernel.org, jgross@suse.com,
Stefano Stabellini <stefano@aporeto.com>
Subject: Re: [PATCH v6 02/13] xen/pvcalls: implement frontend disconnect
Date: Wed, 25 Oct 2017 09:49:54 -0400 [thread overview]
Message-ID: <0a050ea7-2062-8a2c-7929-629e105f218e@oracle.com> (raw)
In-Reply-To: <1508866413-30141-2-git-send-email-sstabellini@kernel.org>
On 10/24/2017 01:33 PM, Stefano Stabellini wrote:
> +static void pvcalls_front_free_map(struct pvcalls_bedata *bedata,
> + struct sock_mapping *map, bool locked)
> +{
> +}
> +
> static const struct xenbus_device_id pvcalls_front_ids[] = {
> { "pvcalls" },
> { "" }
> @@ -27,6 +66,32 @@
>
> static int pvcalls_front_remove(struct xenbus_device *dev)
> {
> + struct pvcalls_bedata *bedata;
> + struct sock_mapping *map = NULL, *n;
Your last comment made me look again at sock_mapping definition. And
then I noticed that it is not defined until patch 4 ;-(
-boris
> +
> + bedata = dev_get_drvdata(&pvcalls_front_dev->dev);
> + dev_set_drvdata(&dev->dev, NULL);
> + pvcalls_front_dev = NULL;
> + if (bedata->irq >= 0)
> + unbind_from_irqhandler(bedata->irq, dev);
> +
> + smp_mb();
> + while (atomic_read(&pvcalls_refcount) > 0)
> + cpu_relax();
> + list_for_each_entry_safe(map, n, &bedata->socket_mappings, list) {
> + if (map->active_socket) {
> + /* No need to lock, refcount is 0 */
> + pvcalls_front_free_map(bedata, map, true);
> + } else {
> + list_del(&map->list);
> + kfree(map);
> + }
> + }
> + if (bedata->ref >= 0)
> + gnttab_end_foreign_access(bedata->ref, 0, 0);
> + kfree(bedata->ring.sring);
> + kfree(bedata);
> + xenbus_switch_state(dev, XenbusStateClosed);
> return 0;
> }
>
next prev parent reply other threads:[~2017-10-25 13:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 17:33 [PATCH v6 00/13] introduce the Xen PV Calls frontend Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 01/13] xen/pvcalls: introduce the pvcalls xenbus frontend Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 02/13] xen/pvcalls: implement frontend disconnect Stefano Stabellini
2017-10-25 13:49 ` Boris Ostrovsky [this message]
2017-10-25 23:22 ` Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 03/13] xen/pvcalls: connect to the backend Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 04/13] xen/pvcalls: implement socket command and handle events Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 05/13] xen/pvcalls: implement connect command Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 06/13] xen/pvcalls: implement bind command Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 07/13] xen/pvcalls: implement listen command Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 08/13] xen/pvcalls: implement accept command Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 09/13] xen/pvcalls: implement sendmsg Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 10/13] xen/pvcalls: implement recvmsg Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 11/13] xen/pvcalls: implement poll command Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 12/13] xen/pvcalls: implement release command Stefano Stabellini
2017-10-25 14:32 ` Boris Ostrovsky
2017-10-25 23:00 ` Stefano Stabellini
2017-10-26 14:11 ` Boris Ostrovsky
2017-10-26 18:21 ` Stefano Stabellini
2017-10-24 17:33 ` [PATCH v6 13/13] xen: introduce a Kconfig option to enable the pvcalls frontend Stefano Stabellini
2017-10-25 14:39 ` Boris Ostrovsky
2017-10-25 22:56 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0a050ea7-2062-8a2c-7929-629e105f218e@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sstabellini@kernel.org \
--cc=stefano@aporeto.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®