get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1373,
    "url": "https://patches.dpdk.org/api/patches/1373/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1416474399-16851-11-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": "<1416474399-16851-11-git-send-email-mukawa@igel.co.jp>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1416474399-16851-11-git-send-email-mukawa@igel.co.jp",
    "date": "2014-11-20T09:06:24",
    "name": "[dpdk-dev,10/25] ethdev: Add rte_eth_dev_get_name_by_port",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a0335659dd36a870286cb6145b445ae5f627eec6",
    "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/1416474399-16851-11-git-send-email-mukawa@igel.co.jp/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1373/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1373/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 692397FEE;\n\tThu, 20 Nov 2014 09:57:16 +0100 (CET)",
            "from mail-pd0-f182.google.com (mail-pd0-f182.google.com\n\t[209.85.192.182]) by dpdk.org (Postfix) with ESMTP id 49E1D7F11\n\tfor <dev@dpdk.org>; Thu, 20 Nov 2014 09:57:12 +0100 (CET)",
            "by mail-pd0-f182.google.com with SMTP id r10so2720330pdi.13\n\tfor <dev@dpdk.org>; Thu, 20 Nov 2014 01:07:40 -0800 (PST)",
            "from localhost.localdomain (napt.igel.co.jp. [219.106.231.132])\n\tby mx.google.com with ESMTPSA id\n\ta6sm1432407pbu.64.2014.11.20.01.07.38 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 20 Nov 2014 01:07:40 -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=mQoNeQX+BnHptVOiYm/5rcBdyVb7bB71f+SxMLJsh6c=;\n\tb=ckS+XwLw1QB3vNde05d7dDHDXyQiGOG2glcuTBj/LS5iX+pmh8mG3KEuZwXHcsoJvS\n\t44Y44EzRNKbm6dvfEjVC871PAWdwll+4mvWnmCI38s+fUIlINmVkv73fdnuKsGY6tNmH\n\tYcqlof4qB7LSPem10RQzsGpUtXG2SUuLJqb3YbUXwsU6Pj77lH7hUaNb8IhZxx9NDCkA\n\tSHQ+Yn7Hc7glHqBYDNz4p7jkcbDGmEh5pN/L6rFUGOnStNuUv9XsZNOxLV9+yOg39ZgX\n\t7l5doLGT0DvyWezztENpZeltLw0y8yFnhfKvVyuXJ/IH12kVqnaTbmCvibJGPNoKzNH/\n\tdypQ==",
        "X-Gm-Message-State": "ALoCoQl1AH7k0KkwxirF+gm0J4mI8ja81bkn+2Eoq9YMGVbG4cnvEcBqhdySL3qHU8mAzt3sRFZJ",
        "X-Received": "by 10.68.111.37 with SMTP id if5mr27758535pbb.140.1416474460909; \n\tThu, 20 Nov 2014 01:07:40 -0800 (PST)",
        "From": "Tetsuya Mukawa <mukawa@igel.co.jp>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 20 Nov 2014 18:06:24 +0900",
        "Message-Id": "<1416474399-16851-11-git-send-email-mukawa@igel.co.jp>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1416474399-16851-1-git-send-email-mukawa@igel.co.jp>",
        "References": "<1414572576-21371-1-git-send-email-mukawa@igel.co.jp>\n\t<1416474399-16851-1-git-send-email-mukawa@igel.co.jp>",
        "Cc": "nakajima.yoshihiro@lab.ntt.co.jp, menrigh@brocade.com,\n\tmasutani.hitoshi@lab.ntt.co.jp",
        "Subject": "[dpdk-dev] [PATCH 10/25] ethdev: Add rte_eth_dev_get_name_by_port",
        "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 function returns a unique identifier name of a ethdev specified by\nport identifier.\n\nSigned-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>\n---\n lib/librte_ether/rte_ethdev.c | 17 +++++++++++++++++\n lib/librte_ether/rte_ethdev.h | 12 ++++++++++++\n 2 files changed, 29 insertions(+)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex fa5b928..372ab7d 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -449,6 +449,23 @@ rte_eth_dev_get_port_by_addr(struct rte_pci_addr *addr, uint8_t *port_id)\n \treturn -1;\n }\n \n+int\n+rte_eth_dev_get_name_by_port(uint8_t port_id, char *name)\n+{\n+\tchar *tmp;\n+\n+\tif (rte_eth_dev_validate_port(port_id)) {\n+\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* shouldn't check 'rte_eth_devices[i].data',\n+\t * because it might be overwritten by VDEV PMD */\n+\ttmp = rte_eth_dev_data[port_id].name;\n+\tstrncpy(name, tmp, strlen(tmp) + 1);\n+\treturn 0;\n+}\n+\n static int\n rte_eth_dev_rx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues)\n {\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 8bdc8ae..2087daf 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -1685,6 +1685,18 @@ extern int rte_eth_dev_get_port_by_addr(\n \t\tstruct rte_pci_addr *addr, uint8_t *port_id);\n \n /**\n+ * Function for internal use by port hotplug functions.\n+ * Returns a unique identifier name of a ethdev specified by port identifier.\n+ * @param\tport_id\n+ *   The port identifier.\n+ * @param\tname\n+ *  The pointer to the Unique identifier name for each Ethernet device\n+ * @return\n+ *   - 0 on success, negative on error\n+ */\n+extern int rte_eth_dev_get_name_by_port(uint8_t port_id, char *name);\n+\n+/**\n  * Function for internal use by dummy drivers primarily, e.g. ring-based\n  * driver.\n  * Allocates a new ethdev slot for an ethernet device and returns the pointer\n",
    "prefixes": [
        "dpdk-dev",
        "10/25"
    ]
}