get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 242,
    "url": "https://patches.dpdk.org/api/patches/242/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1409062338-26477-2-git-send-email-david.marchand@6wind.com/",
    "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": "<1409062338-26477-2-git-send-email-david.marchand@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1409062338-26477-2-git-send-email-david.marchand@6wind.com",
    "date": "2014-08-26T14:12:16",
    "name": "[dpdk-dev,1/3] bond: move param parsing in dev_configure",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e09b995e43e36adcee86833e3ef70bcab5da29a2",
    "submitter": {
        "id": 3,
        "url": "https://patches.dpdk.org/api/people/3/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1409062338-26477-2-git-send-email-david.marchand@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/242/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/242/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<david.marchand@6wind.com>",
        "Received": [
            "from mail-wi0-f177.google.com (mail-wi0-f177.google.com\n\t[209.85.212.177]) by dpdk.org (Postfix) with ESMTP id E9857B3C0\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 16:08:24 +0200 (CEST)",
            "by mail-wi0-f177.google.com with SMTP id ho1so4228685wib.4\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 07:12:25 -0700 (PDT)",
            "from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.\n\t[82.239.227.177]) by mx.google.com with ESMTPSA id\n\tcy9sm12568145wib.18.2014.08.26.07.12.23 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 26 Aug 2014 07:12:24 -0700 (PDT)"
        ],
        "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:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=/vM3hv12SQ19FVIZ9HOOKv81dc26fSjqAcT/1Gy+rw4=;\n\tb=JCa4rsyx04kdq9/OIcNwmOIOFUX1DvAUnd+gCy9cHxGWXBr5vU6BjmuSK/dzEIKh78\n\tQcqv1MN73KwSQ/TvF7e/Qxd8TjmuMiHBGHAhWwYuPu3AIyFFsOe/3uqaDLiujM8ZG4ya\n\tMOW5tNUSz6SpZZtRTKsP4uOYj9gp2UUH+5sUPmo1/gHTzCFBDHXlV6CsYbwAJwtClGT5\n\t0ckDw3XZiBbIKaFI2ZJbediYmJQh1DeFg5CnEIxXMqlr8JIzCHskyiFMWtpMajunBrof\n\tskqk8gz4XtZUk3qAP4aeZ2xHsG/vAX6EpEnv61HdaliFenYxFqCl34LzcX4XK+WAo8IL\n\t6NRw==",
        "X-Gm-Message-State": "ALoCoQmh30qfAPxrIN1sNdI/eoD9/447N6mE+Ht9yTuNTHz8P0lO5bPYEPCYY7x5gBr/NDjkSVhV",
        "X-Received": "by 10.180.13.49 with SMTP id e17mr21859491wic.61.1409062344994; \n\tTue, 26 Aug 2014 07:12:24 -0700 (PDT)",
        "From": "David Marchand <david.marchand@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 26 Aug 2014 16:12:16 +0200",
        "Message-Id": "<1409062338-26477-2-git-send-email-david.marchand@6wind.com>",
        "X-Mailer": "git-send-email 1.7.10.4",
        "In-Reply-To": "<1409062338-26477-1-git-send-email-david.marchand@6wind.com>",
        "References": "<1409062338-26477-1-git-send-email-david.marchand@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH 1/3] bond: move param parsing in dev_configure",
        "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>",
        "X-List-Received-Date": "Tue, 26 Aug 2014 14:08:25 -0000"
    },
    "content": "Rework bond pmd initialisation so that we don't need to modify eal for this pmd\nto work.\n\nSigned-off-by: David Marchand <david.marchand@6wind.com>\n---\n lib/librte_pmd_bond/rte_eth_bond_pmd.c     |   33 ++++++++++++++++++++++------\n lib/librte_pmd_bond/rte_eth_bond_private.h |    2 ++\n 2 files changed, 28 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c\nindex d72d6ed..42cf37a 100644\n--- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c\n+++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c\n@@ -707,11 +707,8 @@ bond_ethdev_close(struct rte_eth_dev *dev __rte_unused)\n {\n }\n \n-static int\n-bond_ethdev_configure(struct rte_eth_dev *dev __rte_unused)\n-{\n-\treturn 0;\n-}\n+/* forward declaration */\n+static int bond_ethdev_configure(struct rte_eth_dev *dev);\n \n static void\n bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n@@ -1027,6 +1024,7 @@ struct eth_dev_ops default_dev_ops = {\n static int\n bond_init(const char *name, const char *params)\n {\n+\tstruct bond_dev_private *internals;\n \tstruct rte_kvargs *kvlist;\n \tuint8_t bonding_mode, socket_id;\n \tint  arg_count, port_id;\n@@ -1078,10 +1076,31 @@ bond_init(const char *name, const char *params)\n \t\t\t\tname, bonding_mode, socket_id);\n \t\treturn -1;\n \t}\n+\tinternals = rte_eth_devices[port_id].data->dev_private;\n+\tinternals->kvlist = kvlist;\n \n \tRTE_LOG(INFO, EAL,\n \t\t\t\"Create bonded device %s on port %d in mode %u on socket %u.\\n\",\n \t\t\tname, port_id, bonding_mode, socket_id);\n+\treturn 0;\n+}\n+\n+/* this part will resolve the slave portids after all the other pdev and vdev\n+ * have been allocated */\n+static int\n+bond_ethdev_configure(struct rte_eth_dev *dev)\n+{\n+\tchar *name = dev->data->name;\n+\tstruct bond_dev_private *internals = dev->data->dev_private;\n+\tstruct rte_kvargs *kvlist = internals->kvlist;\n+\tint arg_count, port_id = dev - rte_eth_devices;\n+\n+\t/*\n+\t * if no kvlist, it means that this bonded device has been created\n+\t * through the bonding api.\n+\t */\n+\tif (!kvlist)\n+\t\treturn 0;\n \n \t/* Parse MAC address for bonded device */\n \targ_count = rte_kvargs_count(kvlist, PMD_BOND_MAC_ADDR_KVARG);\n@@ -1199,8 +1218,8 @@ bond_init(const char *name, const char *params)\n }\n \n static struct rte_driver bond_drv = {\n-\t.name = PMD_BOND_NAME,\n-\t.type = PMD_BDEV,\n+\t.name = \"eth_bond\",\n+\t.type = PMD_VDEV,\n \t.init = bond_init,\n };\n \ndiff --git a/lib/librte_pmd_bond/rte_eth_bond_private.h b/lib/librte_pmd_bond/rte_eth_bond_private.h\nindex 60f1e8d..1db6e4d 100644\n--- a/lib/librte_pmd_bond/rte_eth_bond_private.h\n+++ b/lib/librte_pmd_bond/rte_eth_bond_private.h\n@@ -123,6 +123,8 @@ struct bond_dev_private {\n \n \t/** Persisted configuration of slaves */\n \tstruct slave_conf presisted_slaves_conf[RTE_MAX_ETHPORTS];\n+\n+\tstruct rte_kvargs *kvlist;\n };\n \n extern struct eth_dev_ops default_dev_ops;\n",
    "prefixes": [
        "dpdk-dev",
        "1/3"
    ]
}