Show a patch.

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

{
    "id": 42049,
    "url": "http://patches.dpdk.org/api/patches/42049/",
    "web_url": "http://patches.dpdk.org/patch/42049/",
    "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": "<20180702054450.29269-15-qi.z.zhang@intel.com>",
    "date": "2018-07-02T05:44:45",
    "name": "[v8,14/19] net/pcap: enable port detach on secondary process",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9cb2b5408a1b06373c9d61febb45f49aba554191",
    "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/42049/mbox/",
    "series": [
        {
            "id": 344,
            "url": "http://patches.dpdk.org/api/series/344/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=344",
            "date": "2018-07-02T05:44:31",
            "name": "enable hotplug on multi-process",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/344/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42049/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/42049/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "X-ExtLoop1": "1",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Mailer": "git-send-email 2.13.6",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CF8E85F36;\n\tMon,  2 Jul 2018 07:45:08 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 79D88559A\n\tfor <dev@dpdk.org>; Mon,  2 Jul 2018 07:45:05 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Jul 2018 22:45:03 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby orsmga007.jf.intel.com with ESMTP; 01 Jul 2018 22:44:42 -0700"
        ],
        "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180702054450.29269-1-qi.z.zhang@intel.com>",
        "X-Amp-File-Uploaded": "False",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<20180702054450.29269-15-qi.z.zhang@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,298,1526367600\"; d=\"scan'208\";a=\"53379061\"",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Precedence": "list",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "In-Reply-To": "<20180702054450.29269-1-qi.z.zhang@intel.com>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "thomas@monjalon.net,\n\tanatoly.burakov@intel.com",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Mon,  2 Jul 2018 13:44:45 +0800",
        "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-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v8 14/19] net/pcap: enable port detach on\n\tsecondary process"
    },
    "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_private, we can support this\nwith minor change.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/pcap/rte_eth_pcap.c | 15 ++++++++++++++-\n 1 file changed, 14 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c\nindex 6bd4a7d79..6cc20c2b2 100644\n--- a/drivers/net/pcap/rte_eth_pcap.c\n+++ b/drivers/net/pcap/rte_eth_pcap.c\n@@ -925,6 +925,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 +1017,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 +1025,22 @@ 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\t/* detach device on local pprocess only */\n+\t\tif (strlen(rte_vdev_device_args(dev)) == 0)\n+\t\t\treturn rte_eth_dev_release_port_private(eth_dev);\n+\t\t/**\n+\t\t * else this is a private device for current process\n+\t\t * so continue with normal detach scenario\n+\t\t */\n+\t}\n+\n \trte_free(eth_dev->data->dev_private);\n \n \trte_eth_dev_release_port(eth_dev);\n",
    "prefixes": [
        "v8",
        "14/19"
    ]
}