get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7310,
    "url": "https://patches.dpdk.org/api/patches/7310/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1443615142-24381-4-git-send-email-bruce.richardson@intel.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": "<1443615142-24381-4-git-send-email-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1443615142-24381-4-git-send-email-bruce.richardson@intel.com",
    "date": "2015-09-30T12:12:21",
    "name": "[dpdk-dev,3/4] ring: add rte_eth_from_ring function",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ad5ab705c2de91aeb3a2b8c84fbbc2dadefe4bce",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1443615142-24381-4-git-send-email-bruce.richardson@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7310/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7310/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 D68818E69;\n\tWed, 30 Sep 2015 14:12:30 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id E1FBF8DAA\n\tfor <dev@dpdk.org>; Wed, 30 Sep 2015 14:12:26 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga101.fm.intel.com with ESMTP; 30 Sep 2015 05:12:25 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga002.jf.intel.com with ESMTP; 30 Sep 2015 05:12:24 -0700",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tt8UCCMgJ015011; Wed, 30 Sep 2015 13:12:22 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id t8UCCMWp024437;\n\tWed, 30 Sep 2015 13:12:22 +0100",
            "(from bricha3@localhost)\n\tby sivswdev01.ir.intel.com with  id t8UCCMfW024433;\n\tWed, 30 Sep 2015 13:12:22 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,612,1437462000\"; d=\"scan'208\";a=\"816267649\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed, 30 Sep 2015 13:12:21 +0100",
        "Message-Id": "<1443615142-24381-4-git-send-email-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1443615142-24381-1-git-send-email-bruce.richardson@intel.com>",
        "References": "<1443615142-24381-1-git-send-email-bruce.richardson@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 3/4] ring: add rte_eth_from_ring function",
        "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": "Add a one-parameter function to take an existing rte_ring and wrap it as\nan ethdev, returning the port id of the new ethdev instance.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/net/ring/rte_eth_ring.c           |  8 ++++++++\n drivers/net/ring/rte_eth_ring.h           | 14 ++++++++++++++\n drivers/net/ring/rte_eth_ring_version.map |  5 +++++\n 3 files changed, 27 insertions(+)",
    "diff": "diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c\nindex bfd6f4e..d851f9e 100644\n--- a/drivers/net/ring/rte_eth_ring.c\n+++ b/drivers/net/ring/rte_eth_ring.c\n@@ -36,6 +36,7 @@\n #include <rte_ethdev.h>\n #include <rte_malloc.h>\n #include <rte_memcpy.h>\n+#include <rte_memzone.h>\n #include <rte_string_fns.h>\n #include <rte_dev.h>\n #include <rte_kvargs.h>\n@@ -392,6 +393,13 @@ error:\n \treturn -1;\n }\n \n+int\n+rte_eth_from_ring(struct rte_ring *r)\n+{\n+\treturn rte_eth_from_rings(r->name, &r, 1, &r, 1,\n+\t\t\tr->memzone ? r->memzone->socket_id : SOCKET_ID_ANY);\n+}\n+\n enum dev_action{\n \tDEV_CREATE,\n \tDEV_ATTACH\ndiff --git a/drivers/net/ring/rte_eth_ring.h b/drivers/net/ring/rte_eth_ring.h\nindex 5a69bff..4ff83ec 100644\n--- a/drivers/net/ring/rte_eth_ring.h\n+++ b/drivers/net/ring/rte_eth_ring.h\n@@ -65,6 +65,20 @@ int rte_eth_from_rings(const char *name,\n \t\tconst unsigned nb_tx_queues,\n \t\tconst unsigned numa_node);\n \n+/**\n+ * Create a new ethdev port from a ring\n+ *\n+ * This function is a shortcut call for rte_eth_from_rings for the\n+ * case where one wants to take a single rte_ring and use it as though\n+ * it were an ethdev\n+ *\n+ * @param ring\n+ *    the ring to be used as an ethdev\n+ * @return\n+ *    the port number of the newly created ethdev, or -1 on error\n+ */\n+int rte_eth_from_ring(struct rte_ring *r);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map\nindex 0875e25..8e113a4 100644\n--- a/drivers/net/ring/rte_eth_ring_version.map\n+++ b/drivers/net/ring/rte_eth_ring_version.map\n@@ -5,3 +5,8 @@ DPDK_2.0 {\n \n \tlocal: *;\n };\n+\n+DPDK_2.2 {\n+\tglobal:\n+\trte_eth_from_ring;\n+} DPDK_2.0;\n",
    "prefixes": [
        "dpdk-dev",
        "3/4"
    ]
}