Show a patch.

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

{
    "id": 40753,
    "url": "http://patches.dpdk.org/api/patches/40753/",
    "web_url": "http://patches.dpdk.org/patch/40753/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20180607123849.14439-10-qi.z.zhang@intel.com>",
    "date": "2018-06-07T12:38:36",
    "name": "[dpdk-dev,09/22] net/e1000: enable port detach on secondary process",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c7a857905515905402d4dc2542f512959aa3fe77",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/",
        "name": "Zhang, Qi Z",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/patch/40753/mbox/",
    "series": [
        {
            "id": 30,
            "url": "http://patches.dpdk.org/api/series/30/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30",
            "date": "2018-06-07T12:38:27",
            "name": "enable hotplug on multi-process",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/30/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/40753/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/40753/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>",
        "X-Mailman-Version": "2.1.15",
        "X-IronPort-AV": "E=Sophos;i=\"5.49,486,1520924400\"; d=\"scan'208\";a=\"62605608\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-ExtLoop1": "1",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<20180607123849.14439-10-qi.z.zhang@intel.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5CCD31B3D3;\n\tThu,  7 Jun 2018 14:38:44 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 8AD661B28E\n\tfor <dev@dpdk.org>; Thu,  7 Jun 2018 14:38:40 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Jun 2018 05:38:40 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.184])\n\tby orsmga001.jf.intel.com with ESMTP; 07 Jun 2018 05:38:38 -0700"
        ],
        "X-Mailer": "git-send-email 2.13.6",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH 09/22] net/e1000: enable port detach on secondary\n\tprocess",
        "Precedence": "list",
        "Date": "Thu,  7 Jun 2018 20:38:36 +0800",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "X-Amp-File-Uploaded": "False",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "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>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Delivered-To": "patchwork@dpdk.org",
        "In-Reply-To": "<20180607123849.14439-1-qi.z.zhang@intel.com>",
        "List-Unsubscribe": "<https://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "To": "thomas@monjalon.net,\n\tanatoly.burakov@intel.com",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Previously, detach port on secondary process will mess primary\nprocess and cause same device can't be attached again, by take\nadvantage of rte_eth_release_port_local, we can support this with\nminor change.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/e1000/em_ethdev.c | 9 +++++++++\n 1 file changed, 9 insertions(+)",
    "diff": "diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c\nindex 7039dc100..e626cb10c 100644\n--- a/drivers/net/e1000/em_ethdev.c\n+++ b/drivers/net/e1000/em_ethdev.c\n@@ -349,6 +349,15 @@ static int eth_em_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \n static int eth_em_pci_remove(struct rte_pci_device *pci_dev)\n {\n+\tstruct rte_eth_dev *ethdev =\n+\t\trte_eth_dev_allocated(pci_dev->device.name);\n+\n+\tif (!ethdev)\n+\t\treturn -ENODEV;\n+\n+\tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n+\t\treturn rte_eth_dev_release_port_local(ethdev);\n+\n \treturn rte_eth_dev_pci_generic_remove(pci_dev, eth_em_dev_uninit);\n }\n \n",
    "prefixes": [
        "dpdk-dev",
        "09/22"
    ]
}