get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 42933,
    "url": "https://patches.dpdk.org/api/patches/42933/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180712011514.45006-16-qi.z.zhang@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": "<20180712011514.45006-16-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180712011514.45006-16-qi.z.zhang@intel.com",
    "date": "2018-07-12T01:15:10",
    "name": "[v13,15/19] net/softnic: enable hotplug on secondary process",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7cf68499c81e97e6a8f887e1bef9a91c8aa012c1",
    "submitter": {
        "id": 504,
        "url": "https://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180712011514.45006-16-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 534,
            "url": "https://patches.dpdk.org/api/series/534/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=534",
            "date": "2018-07-12T01:14:56",
            "name": "[v13,01/19] ethdev: add function to release port in local process",
            "version": 13,
            "mbox": "https://patches.dpdk.org/series/534/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/42933/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/42933/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 66F171B5FA;\n\tThu, 12 Jul 2018 03:15:48 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id BAB601B5C7\n\tfor <dev@dpdk.org>; Thu, 12 Jul 2018 03:15:06 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Jul 2018 18:15:04 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby fmsmga006.fm.intel.com with ESMTP; 11 Jul 2018 18:15:01 -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,339,1526367600\"; d=\"scan'208\";a=\"244990527\"",
        "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": "Thu, 12 Jul 2018 09:15:10 +0800",
        "Message-Id": "<20180712011514.45006-16-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180712011514.45006-1-qi.z.zhang@intel.com>",
        "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180712011514.45006-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v13 15/19] net/softnic: enable hotplug on\n\tsecondary process",
        "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/softnic/rte_eth_softnic.c | 15 ++++++++++-----\n 1 file changed, 10 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c\nindex 6b3c13e5c..f3b6863ae 100644\n--- a/drivers/net/softnic/rte_eth_softnic.c\n+++ b/drivers/net/softnic/rte_eth_softnic.c\n@@ -741,8 +741,7 @@ pmd_probe(struct rte_vdev_device *vdev)\n \t/* Parse input arguments */\n \tparams = rte_vdev_device_args(vdev);\n \n-\tif (rte_eal_process_type() == RTE_PROC_SECONDARY &&\n-\t    strlen(params) == 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@@ -750,6 +749,7 @@ pmd_probe(struct rte_vdev_device *vdev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &pmd_ops;\n+\t\teth_dev->device = &vdev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\n@@ -803,17 +803,22 @@ pmd_remove(struct rte_vdev_device *vdev)\n {\n \tstruct rte_eth_dev *dev = NULL;\n \tstruct pmd_internals *p;\n+\tconst char *name;\n \n \tif (!vdev)\n \t\treturn -EINVAL;\n \n-\tPMD_LOG(INFO, \"Removing device \\\"%s\\\"\",\n-\t\trte_vdev_device_name(vdev));\n+\tname = rte_vdev_device_name(vdev);\n+\tPMD_LOG(INFO, \"Removing device \\\"%s\\\"\", name);\n \n \t/* Find the ethdev entry */\n-\tdev = rte_eth_dev_allocated(rte_vdev_device_name(vdev));\n+\tdev = rte_eth_dev_allocated(name);\n \tif (dev == NULL)\n \t\treturn -ENODEV;\n+\n+\tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n+\t\treturn rte_eth_dev_release_port_private(dev);\n+\n \tp = dev->data->dev_private;\n \n \t/* Free device data structures*/\n",
    "prefixes": [
        "v13",
        "15/19"
    ]
}