Show a patch.

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

{
    "id": 42035,
    "url": "http://patches.dpdk.org/api/patches/42035/",
    "web_url": "http://patches.dpdk.org/patch/42035/",
    "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-2-qi.z.zhang@intel.com>",
    "date": "2018-07-02T05:44:32",
    "name": "[v8,01/19] ethdev: add function to release port in local process",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e82f8165b2d06e7d80e6fb26f25808b013f976d9",
    "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/42035/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/42035/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/42035/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 57E385689;\n\tMon,  2 Jul 2018 07:44:28 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 784FD4F9A\n\tfor <dev@dpdk.org>; Mon,  2 Jul 2018 07:44:25 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Jul 2018 22:44:23 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby orsmga007.jf.intel.com with ESMTP; 01 Jul 2018 22:44:15 -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-2-qi.z.zhang@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,298,1526367600\"; d=\"scan'208\";a=\"53378900\"",
        "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:32 +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 01/19] ethdev: add function to release port in\n\tlocal process"
    },
    "content": "Add driver API rte_eth_release_port_private to support the\nrequirement that an ethdev only be released on secondary process,\nso only local state be set to unused, share data will not be\nreset so primary process can still use it.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nReviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>\nAcked-by: Remy Horton <remy.horton@intel.com>\n---\n lib/librte_ethdev/rte_ethdev.c        | 12 ++++++++++++\n lib/librte_ethdev/rte_ethdev_driver.h | 13 +++++++++++++\n lib/librte_ethdev/rte_ethdev_pci.h    |  3 +++\n 3 files changed, 28 insertions(+)",
    "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex a9977df97..52a97694c 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -359,6 +359,18 @@ rte_eth_dev_attach_secondary(const char *name)\n }\n \n int\n+rte_eth_dev_release_port_private(struct rte_eth_dev *eth_dev)\n+{\n+\tif (eth_dev == NULL)\n+\t\treturn -EINVAL;\n+\n+\t_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_DESTROY, NULL);\n+\teth_dev->state = RTE_ETH_DEV_UNUSED;\n+\n+\treturn 0;\n+}\n+\n+int\n rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)\n {\n \tif (eth_dev == NULL)\ndiff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h\nindex c9c825e3f..49c27223d 100644\n--- a/lib/librte_ethdev/rte_ethdev_driver.h\n+++ b/lib/librte_ethdev/rte_ethdev_driver.h\n@@ -70,6 +70,19 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);\n \n /**\n  * @internal\n+ * Release the specified ethdev port in local process, only set to ethdev\n+ * state to unused, but not reset share data since it assume other process\n+ * is still using it, typically it is called by secondary process.\n+ *\n+ * @param eth_dev\n+ * The *eth_dev* pointer is the address of the *rte_eth_dev* structure.\n+ * @return\n+ *   - 0 on success, negative on error\n+ */\n+int rte_eth_dev_release_port_private(struct rte_eth_dev *eth_dev);\n+\n+/**\n+ * @internal\n  * Release device queues and clear its configuration to force the user\n  * application to reconfigure it. It is for internal use only.\n  *\ndiff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h\nindex 2cfd37274..eeb944146 100644\n--- a/lib/librte_ethdev/rte_ethdev_pci.h\n+++ b/lib/librte_ethdev/rte_ethdev_pci.h\n@@ -197,6 +197,9 @@ rte_eth_dev_pci_generic_remove(struct rte_pci_device *pci_dev,\n \tif (!eth_dev)\n \t\treturn -ENODEV;\n \n+\tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n+\t\treturn rte_eth_dev_release_port_private(eth_dev);\n+\n \tif (dev_uninit) {\n \t\tret = dev_uninit(eth_dev);\n \t\tif (ret)\n",
    "prefixes": [
        "v8",
        "01/19"
    ]
}