get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44574,
    "url": "http://patchwork.dpdk.org/api/patches/44574/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1536675645-10105-7-git-send-email-reshma.pattan@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1536675645-10105-7-git-send-email-reshma.pattan@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1536675645-10105-7-git-send-email-reshma.pattan@intel.com",
    "date": "2018-09-11T14:20:36",
    "name": "[v2,06/15] net/softnic: add function to get eth device from softnic",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8338a3aeec356f3a6fa64d518f9af8397cd4aea9",
    "submitter": {
        "id": 70,
        "url": "http://patchwork.dpdk.org/api/people/70/?format=api",
        "name": "Pattan, Reshma",
        "email": "reshma.pattan@intel.com"
    },
    "delegate": {
        "id": 10018,
        "url": "http://patchwork.dpdk.org/api/users/10018/?format=api",
        "username": "cristian_dumitrescu",
        "first_name": "Cristian",
        "last_name": "Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1536675645-10105-7-git-send-email-reshma.pattan@intel.com/mbox/",
    "series": [
        {
            "id": 1272,
            "url": "http://patchwork.dpdk.org/api/series/1272/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=1272",
            "date": "2018-09-11T14:20:36",
            "name": null,
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/1272/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/44574/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/44574/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 060E25920;\n\tTue, 11 Sep 2018 16:21:02 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 6C655559A\n\tfor <dev@dpdk.org>; Tue, 11 Sep 2018 16:20:55 +0200 (CEST)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Sep 2018 07:20:55 -0700",
            "from sivswdev02.ir.intel.com (HELO localhost.localdomain)\n\t([10.237.217.46])\n\tby fmsmga007.fm.intel.com with ESMTP; 11 Sep 2018 07:20:54 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,360,1531810800\"; d=\"scan'208\";a=\"69156875\"",
        "From": "Reshma Pattan <reshma.pattan@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>,\n\tReshma Pattan <reshma.pattan@intel.com>",
        "Date": "Tue, 11 Sep 2018 15:20:36 +0100",
        "Message-Id": "<1536675645-10105-7-git-send-email-reshma.pattan@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": "<1536251222-17275-1-git-send-email-reshma.pattan@intel.com>",
        "References": "<1536251222-17275-1-git-send-email-reshma.pattan@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 06/15] net/softnic: add function to get eth\n\tdevice from softnic",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/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 utility function to get the rte_eth_dev from\na given softnic.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nSigned-off-by: Reshma Pattan <reshma.pattan@intel.com>\n---\n drivers/net/softnic/rte_eth_softnic_internals.h | 17 +++++++++++++++++\n 1 file changed, 17 insertions(+)",
    "diff": "diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h\nindex 9c587bc7d..1857ec50d 100644\n--- a/drivers/net/softnic/rte_eth_softnic_internals.h\n+++ b/drivers/net/softnic/rte_eth_softnic_internals.h\n@@ -18,6 +18,7 @@\n #include <rte_table_action.h>\n #include <rte_pipeline.h>\n \n+#include <rte_ethdev_core.h>\n #include <rte_ethdev_driver.h>\n #include <rte_tm_driver.h>\n #include <rte_flow_driver.h>\n@@ -537,6 +538,22 @@ struct pmd_internals {\n \tstruct softnic_thread_data thread_data[RTE_MAX_LCORE];\n };\n \n+static inline struct rte_eth_dev *\n+ETHDEV(struct pmd_internals *softnic)\n+{\n+\tuint16_t port_id;\n+\tint status;\n+\n+\tif (softnic == NULL)\n+\t\treturn NULL;\n+\n+\tstatus = rte_eth_dev_get_port_by_name(softnic->params.name, &port_id);\n+\tif (status)\n+\t\treturn NULL;\n+\n+\treturn &rte_eth_devices[port_id];\n+}\n+\n /**\n  * Ethdev Flow API\n  */\n",
    "prefixes": [
        "v2",
        "06/15"
    ]
}