get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7234,
    "url": "https://patches.dpdk.org/api/patches/7234/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1443487487-31915-3-git-send-email-stephen@networkplumber.org/",
    "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": "<1443487487-31915-3-git-send-email-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1443487487-31915-3-git-send-email-stephen@networkplumber.org",
    "date": "2015-09-29T00:44:43",
    "name": "[dpdk-dev,2/6] ethdev: add common function for reserving DMA regions",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "0413397eb9a462530c5aebbcf8b066197190b56c",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1443487487-31915-3-git-send-email-stephen@networkplumber.org/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7234/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7234/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 956FD5963;\n\tTue, 29 Sep 2015 02:44:51 +0200 (CEST)",
            "from mail-pa0-f51.google.com (mail-pa0-f51.google.com\n\t[209.85.220.51]) by dpdk.org (Postfix) with ESMTP id 21A01568B\n\tfor <dev@dpdk.org>; Tue, 29 Sep 2015 02:44:47 +0200 (CEST)",
            "by pacex6 with SMTP id ex6so188633656pac.0\n\tfor <dev@dpdk.org>; Mon, 28 Sep 2015 17:44:46 -0700 (PDT)",
            "from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net.\n\t[50.53.82.155]) by smtp.gmail.com with ESMTPSA id\n\tsl7sm21702971pbc.54.2015.09.28.17.44.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 28 Sep 2015 17:44:45 -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:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=bDE8atWYoMltShhVjmEuF5z9v8qp19JkIQrcFXOQ3Pw=;\n\tb=bFC3K5khfeut8h/HA2sTsVahSmTDBPTP+oZVb5ijqkUDmYpmXiHgZnD3AVOXGk81Cw\n\tkOKd3ZNyfhCiQioNGRhqQ9Euum376nI3cPoUwXxthsjOBmce8jAh71+b9sneslSYmViR\n\tBla91mppfCEZfRe7bkRL69ZoLI0zXogWmbAFXCYC0/gc/9CJM+eC0zrteXeJw92JPeUd\n\t5cL00XdHzrpa3kQrq+RGa12fsaUxdACGz8LWg0Cbnc6Zmn1H0ZEpXWVPvPpo0UMXNAwO\n\tclL/YxFNZN17lUVo7/TVzPU043cjsxCqTJ9+44xOtdHhb//rmv65z0Wo71wGzvvjtUCM\n\ty9rg==",
        "X-Gm-Message-State": "ALoCoQkjIKRZp0c8RrSWVLMmZ2hpoG433Pjh34IXGigXyFx9J/d3LZwWYCzIPD78H+b69GJj+rXI",
        "X-Received": "by 10.66.253.2 with SMTP id zw2mr30301600pac.104.1443487486350; \n\tMon, 28 Sep 2015 17:44:46 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 28 Sep 2015 17:44:43 -0700",
        "Message-Id": "<1443487487-31915-3-git-send-email-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1443487487-31915-1-git-send-email-stephen@networkplumber.org>",
        "References": "<1443487487-31915-1-git-send-email-stephen@networkplumber.org>",
        "Subject": "[dpdk-dev] [PATCH 2/6] ethdev: add common function for reserving\n\tDMA regions",
        "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": "The code to create aligned DMA regions was copy-n-pasted throughout\nall the drivers. Since this code has to change now create a common\nfunction that just does the right thing for Xen at runtime.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_ether/rte_ethdev.c | 24 ++++++++++++++++++++++++\n lib/librte_ether/rte_ethdev.h | 23 +++++++++++++++++++++++\n 2 files changed, 47 insertions(+)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex b309309..16db841 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -3066,6 +3066,30 @@ rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data)\n \n \treturn 0;\n }\n+ \n+const struct rte_memzone *\n+rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name,\n+\t\t\t uint16_t queue_id, size_t size, unsigned align,\n+\t\t\t int socket_id)\n+{\n+\tchar z_name[RTE_MEMZONE_NAMESIZE];\n+\tconst struct rte_memzone *mz;\n+\n+\tsnprintf(z_name, sizeof(z_name), \"%s_%s_%d_%d\",\n+\t\t dev->driver->pci_drv.name, ring_name,\n+\t\t dev->data->port_id, queue_id);\n+\n+\tmz = rte_memzone_lookup(z_name);\n+\tif (mz)\n+\t\treturn mz;\n+\n+\tif (is_xen_dom0_supported())\n+\t\treturn rte_memzone_reserve_bounded(z_name, size, socket_id,\n+\t\t\t\t\t\t   0, align, RTE_PGSIZE_2M);\n+\telse\n+\t\treturn rte_memzone_reserve_aligned(z_name, size, socket_id,\n+\t\t\t\t\t\t   0, align);\n+}\n \n int\n rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id,\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex fa06554..2955009 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -3978,6 +3978,29 @@ extern int rte_eth_timesync_read_rx_timestamp(uint8_t port_id,\n extern int rte_eth_timesync_read_tx_timestamp(uint8_t port_id,\n \t\t\t\t\t      struct timespec *timestamp);\n \n+/**\n+ * Create memzone for HW rings.\n+ * malloc can't be used as the physical address is needed.\n+ * If the memzone is already created, then this function returns a ptr\n+ * to the old one.\n+ *\n+ * @param eth_dev\n+ *   The *eth_dev* pointer is the address of the *rte_eth_dev* structure\n+ * @param name\n+ *   The name of the memory zone\n+ * @param queue_id\n+ *   The index of the queue to add to name\n+ * @param size\n+ *   The sizeof of the memory area\n+ * @param align\n+ *   Alignment for resulting memzone. Must be a power of 2.\n+ * @param socket_id\n+ *   The *socket_id* argument is the socket identifier in case of NUMA.\n+ */\n+const struct rte_memzone *\n+rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name,\n+\t\t\t uint16_t queue_id, size_t size,\n+\t\t\t unsigned align, int socket_id);\n #ifdef __cplusplus\n }\n #endif\n",
    "prefixes": [
        "dpdk-dev",
        "2/6"
    ]
}