get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1155,
    "url": "http://patches.dpdk.org/api/patches/1155/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1415272471-3299-7-git-send-email-mukawa@igel.co.jp/",
    "project": {
        "id": 1,
        "url": "http://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-7-git-send-email-mukawa@igel.co.jp>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1415272471-3299-7-git-send-email-mukawa@igel.co.jp",
    "date": "2014-11-06T11:14:30",
    "name": "[dpdk-dev,RFC,6/7] lib/librte_vhost: Add vhost-cuse/user specific initialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": true,
    "hash": "da81eda441000f432e504a5bec8962dc653fb7d0",
    "submitter": {
        "id": 64,
        "url": "http://patches.dpdk.org/api/people/64/?format=api",
        "name": "Tetsuya Mukawa",
        "email": "mukawa@igel.co.jp"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1415272471-3299-7-git-send-email-mukawa@igel.co.jp/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/1155/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/1155/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 DEAF37F80;\n\tThu,  6 Nov 2014 12:05:52 +0100 (CET)",
            "from mail-pa0-f46.google.com (mail-pa0-f46.google.com\n\t[209.85.220.46]) by dpdk.org (Postfix) with ESMTP id 804F37F34\n\tfor <dev@dpdk.org>; Thu,  6 Nov 2014 12:05:41 +0100 (CET)",
            "by mail-pa0-f46.google.com with SMTP id lf10so1058302pab.33\n\tfor <dev@dpdk.org>; Thu, 06 Nov 2014 03:15:08 -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.06 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 06 Nov 2014 03:15:07 -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=j3nJ/658Kjk1mOWVWVgknC9SZ4hGk5A8jg1RhI25/Ls=;\n\tb=ByvJD+dqhEqJuMH7EpQ4bsobjRA8iAuF00xv/plXO39P1820Xp8bMZKjWDK6OMQX//\n\tPcuzhO7LgaYXjJ9J2W1Dh5jyAMIJ6aJ0ufOUHPufMOlUH429KEXQzLTheRkzZbZA1IsI\n\tSgTQXlVCT0+YdzFd6Pv7s9S7ggMefYqthRUAzcOYmcJ3Yln2PeRYb43GB3sPnNdgBcf9\n\tLhVySY1FlvHa10O22V6UeTAiWA0Zgvl9ptpl6ph1wSNUI33wTOIZH/bZAeGISkou4Uk2\n\tepVaCTGYq2944XZuGNrbZ4YpkqxUD9PSueOQfsw6VyARNSD5xIZn+/G1MMYKPLdadccQ\n\tKD8g==",
        "X-Gm-Message-State": "ALoCoQlNPvrkn6a/uBrMIlauWoIR+wxhfWW6F7pk0ZJD0jbjcI/Lh4gyweM2EEfOScvtLWLYHgnz",
        "X-Received": "by 10.68.68.132 with SMTP id w4mr3529346pbt.93.1415272507992;\n\tThu, 06 Nov 2014 03:15:07 -0800 (PST)",
        "From": "Tetsuya Mukawa <mukawa@igel.co.jp>",
        "To": "dev@dpdk.org",
        "Date": "Thu,  6 Nov 2014 20:14:30 +0900",
        "Message-Id": "<1415272471-3299-7-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 6/7] lib/librte_vhost: Add vhost-cuse/user\n\tspecific initialization",
        "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": "Initialization of vhost-cuse and vhost-user are different.\nTo call each initialization, the patch is needed.\n\nSigned-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>\n---\n lib/librte_vhost/virtio-net-cdev.c | 12 +++++++++++-\n lib/librte_vhost/virtio-net.c      | 13 ++++++++++---\n 2 files changed, 21 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/virtio-net-cdev.c b/lib/librte_vhost/virtio-net-cdev.c\nindex ac97551..a1ba1f9 100644\n--- a/lib/librte_vhost/virtio-net-cdev.c\n+++ b/lib/librte_vhost/virtio-net-cdev.c\n@@ -42,7 +42,7 @@\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 init_device(struct vhost_device_ctx ctx, 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@@ -186,6 +186,16 @@ cdev_get_config_ll_root(void)\n \treturn cdev_ll_root;\n }\n \n+\n+/**\n+ * CUSE specific device initialization.\n+ */\n+static void\n+cdev_init_device(struct vhost_device_ctx ctx __rte_unused,\n+\t\tstruct virtio_net *dev __rte_unused)\n+{\n+}\n+\n /*\n  * Locate the file containing QEMU's memory space and map it to our address space.\n  */\ndiff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c\nindex 603bb09..13fbb6f 100644\n--- a/lib/librte_vhost/virtio-net.c\n+++ b/lib/librte_vhost/virtio-net.c\n@@ -212,7 +212,7 @@ get_config_ll_root(struct vhost_device_ctx ctx)\n  *  Initialise all variables in device structure.\n  */\n static void\n-init_device(struct virtio_net *dev)\n+init_device(struct vhost_device_ctx ctx, struct virtio_net *dev)\n {\n \tuint64_t vq_offset;\n \n@@ -228,6 +228,13 @@ init_device(struct virtio_net *dev)\n \t/* Backends are set to -1 indicating an inactive device. */\n \tdev->virtqueue[VIRTIO_RXQ]->backend = VIRTIO_DEV_STOPPED;\n \tdev->virtqueue[VIRTIO_TXQ]->backend = VIRTIO_DEV_STOPPED;\n+\n+\tswitch (ctx.type) {\n+\tcase VHOST_DRV_CUSE:\n+\t\treturn cdev_init_device(ctx, dev);\n+\tdefault:\n+\t\tbreak;\n+\t}\n }\n \n /*\n@@ -273,7 +280,7 @@ new_device(struct vhost_device_ctx ctx)\n \tnew_ll_dev->dev.virtqueue[VIRTIO_TXQ] = virtqueue_tx;\n \n \t/* Initialise device and virtqueues. */\n-\tinit_device(&new_ll_dev->dev);\n+\tinit_device(ctx, &new_ll_dev->dev);\n \n \tnew_ll_dev->next = NULL;\n \n@@ -339,7 +346,7 @@ reset_owner(struct vhost_device_ctx ctx)\n \tll_dev = get_config_ll_entry(ctx);\n \n \tcleanup_device(&ll_dev->dev);\n-\tinit_device(&ll_dev->dev);\n+\tinit_device(ctx, &ll_dev->dev);\n \n \treturn 0;\n }\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "6/7"
    ]
}