get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 42871,
    "url": "http://patches.dpdk.org/api/patches/42871/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180711134808.254054-15-qi.z.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20180711134808.254054-15-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180711134808.254054-15-qi.z.zhang@intel.com",
    "date": "2018-07-11T13:48:03",
    "name": "[v12,14/19] net/pcap: enable hotplug on secondary process",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "09bb569e9626b8ede6c8de5810da624d86e70bd3",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180711134808.254054-15-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 524,
            "url": "http://patches.dpdk.org/api/series/524/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=524",
            "date": "2018-07-11T13:47:49",
            "name": "enable hotplug on multi-process",
            "version": 12,
            "mbox": "http://patches.dpdk.org/series/524/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42871/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/42871/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 701E91B5F9;\n\tWed, 11 Jul 2018 15:48:06 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id BAD1B1B5D0\n\tfor <dev@dpdk.org>; Wed, 11 Jul 2018 15:47:53 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Jul 2018 06:47:53 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby FMSMGA003.fm.intel.com with ESMTP; 11 Jul 2018 06:47:52 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,338,1526367600\"; d=\"scan'208\";a=\"63905337\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "thomas@monjalon.net,\n\tanatoly.burakov@intel.com",
        "Cc": "konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, \n\tferruh.yigit@intel.com, benjamin.h.shelton@intel.com,\n\tnarender.vangati@intel.com, Qi Zhang <qi.z.zhang@intel.com>",
        "Date": "Wed, 11 Jul 2018 21:48:03 +0800",
        "Message-Id": "<20180711134808.254054-15-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180711134808.254054-1-qi.z.zhang@intel.com>",
        "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180711134808.254054-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v12 14/19] net/pcap: enable hotplug on secondary\n\tprocess",
        "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": "Attach port from secondary should ignore devargs since the private\ndevice is not necessary to support. Also previously, detach port on\na secondary process will mess primary process and cause the same\ndevice can't be attached back again. A secondary process should use\nrte_eth_release_port_private to release a port.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/pcap/rte_eth_pcap.c | 11 ++++++++---\n 1 file changed, 8 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c\nindex 6bd4a7d79..3c27a98df 100644\n--- a/drivers/net/pcap/rte_eth_pcap.c\n+++ b/drivers/net/pcap/rte_eth_pcap.c\n@@ -916,8 +916,7 @@ pmd_pcap_probe(struct rte_vdev_device *dev)\n \tstart_cycles = rte_get_timer_cycles();\n \thz = rte_get_timer_hz();\n \n-\tif (rte_eal_process_type() == RTE_PROC_SECONDARY &&\n-\t    strlen(rte_vdev_device_args(dev)) == 0) {\n+\tif (rte_eal_process_type() == RTE_PROC_SECONDARY) {\n \t\teth_dev = rte_eth_dev_attach_secondary(name);\n \t\tif (!eth_dev) {\n \t\t\tPMD_LOG(ERR, \"Failed to probe %s\", name);\n@@ -925,6 +924,7 @@ pmd_pcap_probe(struct rte_vdev_device *dev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &ops;\n+\t\teth_dev->device = &dev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\n@@ -1016,6 +1016,7 @@ static int\n pmd_pcap_remove(struct rte_vdev_device *dev)\n {\n \tstruct rte_eth_dev *eth_dev = NULL;\n+\tconst char *name;\n \n \tPMD_LOG(INFO, \"Closing pcap ethdev on numa socket %d\",\n \t\t\trte_socket_id());\n@@ -1023,11 +1024,15 @@ pmd_pcap_remove(struct rte_vdev_device *dev)\n \tif (!dev)\n \t\treturn -1;\n \n+\tname = rte_vdev_device_name(dev);\n \t/* reserve an ethdev entry */\n-\teth_dev = rte_eth_dev_allocated(rte_vdev_device_name(dev));\n+\teth_dev = rte_eth_dev_allocated(name);\n \tif (eth_dev == NULL)\n \t\treturn -1;\n \n+\tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n+\t\treturn rte_eth_dev_release_port_private(eth_dev);\n+\n \trte_free(eth_dev->data->dev_private);\n \n \trte_eth_dev_release_port(eth_dev);\n",
    "prefixes": [
        "v12",
        "14/19"
    ]
}