get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1154/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1154,
    "url": "https://patches.dpdk.org/api/patches/1154/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1415272471-3299-5-git-send-email-mukawa@igel.co.jp/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1415272471-3299-5-git-send-email-mukawa@igel.co.jp>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1415272471-3299-5-git-send-email-mukawa@igel.co.jp",
    "date": "2014-11-06T11:14:28",
    "name": "[dpdk-dev,RFC,4/7] lib/librte_vhost: Move vhost vhost-cuse device list and accessor functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": true,
    "hash": "2425e3b9b63d43e1726d28a125ba8cc008b9b538",
    "submitter": {
        "id": 64,
        "url": "https://patches.dpdk.org/api/people/64/?format=api",
        "name": "Tetsuya Mukawa",
        "email": "mukawa@igel.co.jp"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1415272471-3299-5-git-send-email-mukawa@igel.co.jp/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1154/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1154/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 7AD587F58;\n\tThu,  6 Nov 2014 12:05:51 +0100 (CET)",
            "from mail-pa0-f47.google.com (mail-pa0-f47.google.com\n\t[209.85.220.47]) by dpdk.org (Postfix) with ESMTP id 8678D7E80\n\tfor <dev@dpdk.org>; Thu,  6 Nov 2014 12:05:37 +0100 (CET)",
            "by mail-pa0-f47.google.com with SMTP id kx10so1055330pab.34\n\tfor <dev@dpdk.org>; Thu, 06 Nov 2014 03:15:04 -0800 (PST)",
            "from localhost.localdomain (napt.igel.co.jp. [219.106.231.132])\n\tby mx.google.com with ESMTPSA id\n\tjc3sm5652315pbb.49.2014.11.06.03.15.02 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 06 Nov 2014 03:15:03 -0800 (PST)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=j8NuxNL4nwzjy7TXXejgokZja5NuwLpgP1vn1fXBfzk=;\n\tb=N5p0tGs+EGZ/4s6gtQVOang3UQi+sd1hB3h5cSkbnnVZHtX/CrgIVb5I5W2+J81TIA\n\t5R34kjUyOur2qt7DykU19KPtFtCxijNqBvlUVLi8Y7GLeoCrSp6ZMj7Pyv9ELUsK/IUa\n\t6NalWxhJ+cXZARwat9KimM4YydGVrvGQbK+h+dAHKdURg944VikKxH3a7KTQfoPVEcag\n\t1KySIOorIDYrMiQmLNmfULruQ61AKaMAWhXn8luJ0CAxl/t10IuQ36fWfvkBUhqQEcS0\n\ta83al6/K/TR0eURXdQUN5SunP/vor4K+FlrAnTuWQHRVeXAZi1cEXvJlVwWC/TJn4ctE\n\tqa+g==",
        "X-Gm-Message-State": "ALoCoQmo+khb8xvyCJk0fN+QNz1Fk6Csb6YDboBWZRVbKDCrjs8eS6PEMhBpLNesPSIUihV4XMXQ",
        "X-Received": "by 10.70.45.72 with SMTP id k8mr3745702pdm.146.1415272503916;\n\tThu, 06 Nov 2014 03:15:03 -0800 (PST)",
        "From": "Tetsuya Mukawa <mukawa@igel.co.jp>",
        "To": "dev@dpdk.org",
        "Date": "Thu,  6 Nov 2014 20:14:28 +0900",
        "Message-Id": "<1415272471-3299-5-git-send-email-mukawa@igel.co.jp>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1415272471-3299-1-git-send-email-mukawa@igel.co.jp>",
        "References": "<1415272471-3299-1-git-send-email-mukawa@igel.co.jp>",
        "Cc": "nakajima.yoshihiro@lab.ntt.co.jp, masutani.hitoshi@lab.ntt.co.jp",
        "Subject": "[dpdk-dev] [RFC PATCH 4/7] lib/librte_vhost: Move vhost vhost-cuse\n\tdevice list and accessor functions",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "vhost-cuse and vhost-user should have a independent device list.\nThis patch moves vhost-cuse device list and list accessor functions\nto 'virtio-net-cdev.c'.\n\nSigned-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>\n---\n lib/librte_vhost/vhost-net-cdev.c  |   1 +\n lib/librte_vhost/vhost-net.h       |   5 +-\n lib/librte_vhost/virtio-net-cdev.c | 133 +++++++++++++++++++++++++++++++++++--\n lib/librte_vhost/virtio-net.c      | 121 ++++++++++++++-------------------\n 4 files changed, 181 insertions(+), 79 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/vhost-net-cdev.c b/lib/librte_vhost/vhost-net-cdev.c\nindex 12d0f68..090c6fc 100644\n--- a/lib/librte_vhost/vhost-net-cdev.c\n+++ b/lib/librte_vhost/vhost-net-cdev.c\n@@ -66,6 +66,7 @@ fuse_req_to_vhost_ctx(fuse_req_t req, struct fuse_file_info *fi)\n \tstruct vhost_device_ctx ctx;\n \tstruct fuse_ctx const *const req_ctx = fuse_req_ctx(req);\n \n+\tctx.type = VHOST_DRV_CUSE;\n \tctx.pid = req_ctx->pid;\n \tctx.fh = fi->fh;\n \ndiff --git a/lib/librte_vhost/vhost-net.h b/lib/librte_vhost/vhost-net.h\nindex 09a99ce..64873d0 100644\n--- a/lib/librte_vhost/vhost-net.h\n+++ b/lib/librte_vhost/vhost-net.h\n@@ -77,8 +77,9 @@\n  * Structure used to identify device context.\n  */\n struct vhost_device_ctx {\n-\tpid_t\t\tpid;\t/* PID of process calling the IOCTL. */\n-\tuint64_t\tfh;\t/* Populated with fi->fh to track the device index. */\n+\tvhost_driver_type_t\ttype;\t/* driver type. */\n+\tpid_t\t\t\tpid;\t/* PID of process calling the IOCTL. */\n+\tuint64_t\t\tfh;\t/* Populated with fi->fh to track the device index. */\n };\n \n /*\ndiff --git a/lib/librte_vhost/virtio-net-cdev.c b/lib/librte_vhost/virtio-net-cdev.c\nindex f225bf5..70bc578 100644\n--- a/lib/librte_vhost/virtio-net-cdev.c\n+++ b/lib/librte_vhost/virtio-net-cdev.c\n@@ -41,6 +41,24 @@\n #include \"vhost-net.h\"\n #include \"eventfd_link/eventfd_link.h\"\n \n+/* Functions defined in virtio_net.c */\n+static void init_device(struct virtio_net *dev);\n+static void cleanup_device(struct virtio_net *dev);\n+static void free_device(struct virtio_net_config_ll *ll_dev);\n+static int new_device(struct vhost_device_ctx ctx);\n+static void destroy_device(struct vhost_device_ctx ctx);\n+static int set_owner(struct vhost_device_ctx ctx);\n+static int reset_owner(struct vhost_device_ctx ctx);\n+static int get_features(struct vhost_device_ctx ctx, uint64_t *pu);\n+static int set_features(struct vhost_device_ctx ctx, uint64_t *pu);\n+static int set_vring_num(struct vhost_device_ctx ctx, struct vhost_vring_state *state);\n+static int set_vring_addr(struct vhost_device_ctx ctx, struct vhost_vring_addr *addr);\n+static int set_vring_base(struct vhost_device_ctx ctx, struct vhost_vring_state *state);\n+static int set_backend(struct vhost_device_ctx ctx, struct vhost_vring_file *file);\n+\n+/* Root address of the linked list in the configuration core. */\n+static struct virtio_net_config_ll *cdev_ll_root;\n+\n const char eventfd_cdev[] = \"/dev/eventfd-link\";\n \n /* Line size for reading maps file. */\n@@ -65,11 +83,114 @@ struct procmap {\n \tchar\t\tfname[PATH_MAX];/* File name. */\n };\n \n+/**\n+ * Retrieves an entry from the devices configuration linked list.\n+ */\n+static struct virtio_net_config_ll *\n+cdev_get_config_ll_entry(struct vhost_device_ctx ctx)\n+{\n+\tstruct virtio_net_config_ll *ll_dev = cdev_ll_root;\n+\n+\t/* Loop through linked list until the device_fh is found. */\n+\twhile (ll_dev != NULL) {\n+\t\tif (ll_dev->dev.device_fh == ctx.fh)\n+\t\t\treturn ll_dev;\n+\t\tll_dev = ll_dev->next;\n+\t}\n+\n+\treturn NULL;\n+}\n+\n+/**\n+ * Searches the configuration core linked list and retrieves the device if it exists.\n+ */\n+static struct virtio_net *\n+cdev_get_device(struct vhost_device_ctx ctx)\n+{\n+\tstruct virtio_net_config_ll *ll_dev;\n+\n+\tll_dev = cdev_get_config_ll_entry(ctx);\n+\n+\t/* If a matching entry is found in the linked list, return the device in that entry. */\n+\tif (ll_dev)\n+\t\treturn &ll_dev->dev;\n+\n+\tRTE_LOG(ERR, VHOST_CONFIG, \"(%\"PRIu64\") Device not found in linked list.\\n\", ctx.fh);\n+\treturn NULL;\n+}\n+\n+/**\n+ * Add entry containing a device to the device configuration linked list.\n+ */\n+static void\n+cdev_add_config_ll_entry(struct virtio_net_config_ll *new_ll_dev)\n+{\n+\tstruct virtio_net_config_ll *ll_dev = cdev_ll_root;\n+\n+\t/* If ll_dev == NULL then this is the first device so go to else */\n+\tif (ll_dev) {\n+\t\t/* If the 1st device_fh != 0 then we insert our device here. */\n+\t\tif (ll_dev->dev.device_fh != 0) {\n+\t\t\tnew_ll_dev->dev.device_fh = 0;\n+\t\t\tnew_ll_dev->next = ll_dev;\n+\t\t\tcdev_ll_root = new_ll_dev;\n+\t\t} else {\n+\t\t\t/* Increment through the ll until we find un unused device_fh. Insert the device at that entry*/\n+\t\t\twhile ((ll_dev->next != NULL) && (ll_dev->dev.device_fh == (ll_dev->next->dev.device_fh - 1)))\n+\t\t\t\tll_dev = ll_dev->next;\n+\n+\t\t\tnew_ll_dev->dev.device_fh = ll_dev->dev.device_fh + 1;\n+\t\t\tnew_ll_dev->next = ll_dev->next;\n+\t\t\tll_dev->next = new_ll_dev;\n+\t\t}\n+\t} else {\n+\t\tcdev_ll_root = new_ll_dev;\n+\t\tcdev_ll_root->dev.device_fh = 0;\n+\t}\n+\n+}\n+\n+/**\n+ * Remove an entry from the device configuration linked list.\n+ */\n+static struct virtio_net_config_ll *\n+cdev_rm_config_ll_entry(struct virtio_net_config_ll *ll_dev, struct virtio_net_config_ll *ll_dev_last)\n+{\n+\t/* First remove the device and then clean it up. */\n+\tif (ll_dev == cdev_ll_root) {\n+\t\tcdev_ll_root = ll_dev->next;\n+\t\tcleanup_device(&ll_dev->dev);\n+\t\tfree_device(ll_dev);\n+\t\treturn cdev_ll_root;\n+\t} else {\n+\t\tif (likely(ll_dev_last != NULL)) {\n+\t\t\tll_dev_last->next = ll_dev->next;\n+\t\t\tcleanup_device(&ll_dev->dev);\n+\t\t\tfree_device(ll_dev);\n+\t\t\treturn ll_dev_last->next;\n+\t\t} else {\n+\t\t\tcleanup_device(&ll_dev->dev);\n+\t\t\tfree_device(ll_dev);\n+\t\t\tRTE_LOG(ERR, VHOST_CONFIG, \"Remove entry from config_ll failed\\n\");\n+\t\t\treturn NULL;\n+\t\t}\n+\t}\n+}\n+\n+/**\n+ * Returns the root entry of linked list\n+ */\n+static struct virtio_net_config_ll *\n+cdev_get_config_ll_root(void)\n+{\n+\treturn cdev_ll_root;\n+}\n+\n /*\n  * Locate the file containing QEMU's memory space and map it to our address space.\n  */\n static int\n-host_memory_map(struct virtio_net *dev, struct virtio_memory *mem,\n+cdev_host_memory_map(struct virtio_net *dev, struct virtio_memory *mem,\n \tpid_t pid, uint64_t addr)\n {\n \tstruct dirent *dptr = NULL;\n@@ -247,7 +368,7 @@ cuse_set_mem_table(struct vhost_device_ctx ctx, const void *mem_regions_addr,\n \tuint64_t size = offsetof(struct vhost_memory, regions);\n \tuint32_t regionidx, valid_regions;\n \n-\tdev = get_device(ctx);\n+\tdev = cdev_get_device(ctx);\n \tif (dev == NULL)\n \t\treturn -1;\n \n@@ -291,7 +412,7 @@ cuse_set_mem_table(struct vhost_device_ctx ctx, const void *mem_regions_addr,\n \t\tif (mem->regions[regionidx].guest_phys_address == 0x0) {\n \t\t\tmem->base_address = mem->regions[regionidx].userspace_address;\n \t\t\t/* Map VM memory file */\n-\t\t\tif (host_memory_map(dev, mem, ctx.pid, mem->base_address) != 0) {\n+\t\t\tif (cdev_host_memory_map(dev, mem, ctx.pid, mem->base_address) != 0) {\n \t\t\t\tfree(mem);\n \t\t\t\treturn -1;\n \t\t\t}\n@@ -356,7 +477,7 @@ cuse_get_vring_base(struct vhost_device_ctx ctx, uint32_t index,\n {\n \tstruct virtio_net *dev;\n \n-\tdev = get_device(ctx);\n+\tdev = cdev_get_device(ctx);\n \tif (dev == NULL)\n \t\treturn -1;\n \n@@ -408,7 +529,7 @@ cuse_set_vring_call(struct vhost_device_ctx ctx, struct vhost_vring_file *file)\n \tstruct eventfd_copy     eventfd_kick;\n \tstruct vhost_virtqueue *vq;\n \n-\tdev = get_device(ctx);\n+\tdev = cdev_get_device(ctx);\n \tif (dev == NULL)\n \t\treturn -1;\n \n@@ -442,7 +563,7 @@ cuse_set_vring_kick(struct vhost_device_ctx ctx, struct vhost_vring_file *file)\n \tstruct eventfd_copy eventfd_call;\n \tstruct vhost_virtqueue *vq;\n \n-\tdev = get_device(ctx);\n+\tdev = cdev_get_device(ctx);\n \tif (dev == NULL)\n \t\treturn -1;\n \ndiff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c\nindex 985c66b..603bb09 100644\n--- a/lib/librte_vhost/virtio-net.c\n+++ b/lib/librte_vhost/virtio-net.c\n@@ -61,8 +61,6 @@ struct virtio_net_config_ll {\n \n /* device ops to add/remove device to data core. */\n static struct virtio_net_device_ops const *notify_ops;\n-/* Root address of the linked list in the configuration core. */\n-static struct virtio_net_config_ll\t*ll_root;\n \n /* Features supported by this application. RX merge buffers are enabled by default. */\n #define VHOST_SUPPORTED_FEATURES (1ULL << VIRTIO_NET_F_MRG_RXBUF)\n@@ -93,21 +91,23 @@ qva_to_vva(struct virtio_net *dev, uint64_t qemu_va)\n \treturn vhost_va;\n }\n \n+/**\n+ * Include cuse depend functions and definitions.\n+ */\n+#include \"virtio-net-cdev.c\"\n+\n /*\n  * Retrieves an entry from the devices configuration linked list.\n  */\n static struct virtio_net_config_ll *\n get_config_ll_entry(struct vhost_device_ctx ctx)\n {\n-\tstruct virtio_net_config_ll *ll_dev = ll_root;\n-\n-\t/* Loop through linked list until the device_fh is found. */\n-\twhile (ll_dev != NULL) {\n-\t\tif (ll_dev->dev.device_fh == ctx.fh)\n-\t\t\treturn ll_dev;\n-\t\tll_dev = ll_dev->next;\n+\tswitch (ctx.type) {\n+\tcase VHOST_DRV_CUSE:\n+\t\treturn cdev_get_config_ll_entry(ctx);\n+\tdefault:\n+\t\tbreak;\n \t}\n-\n \treturn NULL;\n }\n \n@@ -117,15 +117,12 @@ get_config_ll_entry(struct vhost_device_ctx ctx)\n static struct virtio_net *\n get_device(struct vhost_device_ctx ctx)\n {\n-\tstruct virtio_net_config_ll *ll_dev;\n-\n-\tll_dev = get_config_ll_entry(ctx);\n-\n-\t/* If a matching entry is found in the linked list, return the device in that entry. */\n-\tif (ll_dev)\n-\t\treturn &ll_dev->dev;\n-\n-\tRTE_LOG(ERR, VHOST_CONFIG, \"(%\"PRIu64\") Device not found in linked list.\\n\", ctx.fh);\n+\tswitch (ctx.type) {\n+\tcase VHOST_DRV_CUSE:\n+\t\treturn cdev_get_device(ctx);\n+\tdefault:\n+\t\tbreak;\n+\t}\n \treturn NULL;\n }\n \n@@ -133,31 +130,15 @@ get_device(struct vhost_device_ctx ctx)\n  * Add entry containing a device to the device configuration linked list.\n  */\n static void\n-add_config_ll_entry(struct virtio_net_config_ll *new_ll_dev)\n+add_config_ll_entry(vhost_driver_type_t type,\n+\t\tstruct virtio_net_config_ll *new_ll_dev)\n {\n-\tstruct virtio_net_config_ll *ll_dev = ll_root;\n-\n-\t/* If ll_dev == NULL then this is the first device so go to else */\n-\tif (ll_dev) {\n-\t\t/* If the 1st device_fh != 0 then we insert our device here. */\n-\t\tif (ll_dev->dev.device_fh != 0)\t{\n-\t\t\tnew_ll_dev->dev.device_fh = 0;\n-\t\t\tnew_ll_dev->next = ll_dev;\n-\t\t\tll_root = new_ll_dev;\n-\t\t} else {\n-\t\t\t/* Increment through the ll until we find un unused device_fh. Insert the device at that entry*/\n-\t\t\twhile ((ll_dev->next != NULL) && (ll_dev->dev.device_fh == (ll_dev->next->dev.device_fh - 1)))\n-\t\t\t\tll_dev = ll_dev->next;\n-\n-\t\t\tnew_ll_dev->dev.device_fh = ll_dev->dev.device_fh + 1;\n-\t\t\tnew_ll_dev->next = ll_dev->next;\n-\t\t\tll_dev->next = new_ll_dev;\n-\t\t}\n-\t} else {\n-\t\tll_root = new_ll_dev;\n-\t\tll_root->dev.device_fh = 0;\n+\tswitch (type) {\n+\tcase VHOST_DRV_CUSE:\n+\t\treturn cdev_add_config_ll_entry(new_ll_dev);\n+\tdefault:\n+\t\tbreak;\n \t}\n-\n }\n \n /*\n@@ -199,29 +180,32 @@ free_device(struct virtio_net_config_ll *ll_dev)\n  * Remove an entry from the device configuration linked list.\n  */\n static struct virtio_net_config_ll *\n-rm_config_ll_entry(struct virtio_net_config_ll *ll_dev,\n-\tstruct virtio_net_config_ll *ll_dev_last)\n+rm_config_ll_entry(vhost_driver_type_t type,\n+\t\tstruct virtio_net_config_ll *ll_dev,\n+\t\tstruct virtio_net_config_ll *ll_dev_last)\n {\n-\t/* First remove the device and then clean it up. */\n-\tif (ll_dev == ll_root) {\n-\t\tll_root = ll_dev->next;\n-\t\tcleanup_device(&ll_dev->dev);\n-\t\tfree_device(ll_dev);\n-\t\treturn ll_root;\n-\t} else {\n-\t\tif (likely(ll_dev_last != NULL)) {\n-\t\t\tll_dev_last->next = ll_dev->next;\n-\t\t\tcleanup_device(&ll_dev->dev);\n-\t\t\tfree_device(ll_dev);\n-\t\t\treturn ll_dev_last->next;\n-\t\t} else {\n-\t\t\tcleanup_device(&ll_dev->dev);\n-\t\t\tfree_device(ll_dev);\n-\t\t\tRTE_LOG(ERR, VHOST_CONFIG,\n-\t\t\t\t\"Remove entry from config_ll failed\\n\");\n-\t\t\treturn NULL;\n-\t\t}\n+\tswitch (type) {\n+\tcase VHOST_DRV_CUSE:\n+\t\treturn cdev_rm_config_ll_entry(ll_dev, ll_dev_last);\n+\tdefault:\n+\t\tbreak;\n+\t}\n+\treturn NULL;\n+}\n+\n+/**\n+ * Get a root entry of linked list.\n+ */\n+static struct virtio_net_config_ll *\n+get_config_ll_root(struct vhost_device_ctx ctx)\n+{\n+\tswitch (ctx.type) {\n+\tcase VHOST_DRV_CUSE:\n+\t\treturn cdev_get_config_ll_root(ctx);\n+\tdefault:\n+\t\tbreak;\n \t}\n+\treturn NULL;\n }\n \n /*\n@@ -294,7 +278,7 @@ new_device(struct vhost_device_ctx ctx)\n \tnew_ll_dev->next = NULL;\n \n \t/* Add entry to device configuration linked list. */\n-\tadd_config_ll_entry(new_ll_dev);\n+\tadd_config_ll_entry(ctx.type, new_ll_dev);\n \n \treturn new_ll_dev->dev.device_fh;\n }\n@@ -307,7 +291,7 @@ static void\n destroy_device(struct vhost_device_ctx ctx)\n {\n \tstruct virtio_net_config_ll *ll_dev_cur_ctx, *ll_dev_last = NULL;\n-\tstruct virtio_net_config_ll *ll_dev_cur = ll_root;\n+\tstruct virtio_net_config_ll *ll_dev_cur = get_config_ll_root(ctx);\n \n \t/* Find the linked list entry for the device to be removed. */\n \tll_dev_cur_ctx = get_config_ll_entry(ctx);\n@@ -320,7 +304,7 @@ destroy_device(struct vhost_device_ctx ctx)\n \t\t\t */\n \t\t\tif ((ll_dev_cur->dev.flags & VIRTIO_DEV_RUNNING))\n \t\t\t\tnotify_ops->destroy_device(&(ll_dev_cur->dev));\n-\t\t\tll_dev_cur = rm_config_ll_entry(ll_dev_cur, ll_dev_last);\n+\t\t\tll_dev_cur = rm_config_ll_entry(ctx.type, ll_dev_cur, ll_dev_last);\n \t\t} else {\n \t\t\tll_dev_last = ll_dev_cur;\n \t\t\tll_dev_cur = ll_dev_cur->next;\n@@ -528,11 +512,6 @@ set_backend(struct vhost_device_ctx ctx, struct vhost_vring_file *file)\n }\n \n /*\n- * Include cuse depend functions and definitions.\n- */\n-#include \"virtio-net-cdev.c\"\n-\n-/*\n  * Called by main to setup callbacks when registering device.\n  */\n struct vhost_net_device_ops const *\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "4/7"
    ]
}