get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43728,
    "url": "http://patches.dpdk.org/api/patches/43728/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180816030455.41354-6-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": "<20180816030455.41354-6-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180816030455.41354-6-qi.z.zhang@intel.com",
    "date": "2018-08-16T03:04:53",
    "name": "[v15,5/7] drivers/net: enable device detach on secondary",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3be9bfca111113a03e13627752be455fb09944a1",
    "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/20180816030455.41354-6-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 993,
            "url": "http://patches.dpdk.org/api/series/993/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=993",
            "date": "2018-08-16T03:04:48",
            "name": "enable hotplug on multi-process",
            "version": 15,
            "mbox": "http://patches.dpdk.org/series/993/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43728/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43728/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 DF3024CC3;\n\tThu, 16 Aug 2018 05:04:28 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 811664CBB\n\tfor <dev@dpdk.org>; Thu, 16 Aug 2018 05:04:27 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t15 Aug 2018 20:04:27 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby orsmga002.jf.intel.com with ESMTP; 15 Aug 2018 20:04:24 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,245,1531810800\"; d=\"scan'208\";a=\"83720846\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "thomas@monjalon.net, gaetan.rivet@6wind.com, anatoly.burakov@intel.com, \n\tarybchenko@solarflare.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, 16 Aug 2018 11:04:53 +0800",
        "Message-Id": "<20180816030455.41354-6-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180816030455.41354-1-qi.z.zhang@intel.com>",
        "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180816030455.41354-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v15 5/7] drivers/net: enable device detach on\n\tsecondary",
        "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": "With the enabling for hotplug on multi-process,\nrte_eth_dev_pci_generic_remove can be used to detach the device from\na secondary process also. But we need to take care of the uninit callback\nparameter to make sure it handles the secondary case correctly.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/bnxt/bnxt_ethdev.c     | 6 +++++-\n drivers/net/ena/ena_ethdev.c       | 2 +-\n drivers/net/liquidio/lio_ethdev.c  | 2 +-\n drivers/net/virtio/virtio_ethdev.c | 2 +-\n 4 files changed, 8 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c\nindex cc7e4391c..c092bdb06 100644\n--- a/drivers/net/bnxt/bnxt_ethdev.c\n+++ b/drivers/net/bnxt/bnxt_ethdev.c\n@@ -3515,7 +3515,11 @@ static int bnxt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \n static int bnxt_pci_remove(struct rte_pci_device *pci_dev)\n {\n-\treturn rte_eth_dev_pci_generic_remove(pci_dev, bnxt_dev_uninit);\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n+\t\treturn rte_eth_dev_pci_generic_remove(pci_dev,\n+\t\t\t\tbnxt_dev_uninit);\n+\telse\n+\t\treturn rte_eth_dev_pci_generic_remove(pci_dev, NULL);\n }\n \n static struct rte_pci_driver bnxt_rte_pmd = {\ndiff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c\nindex c255dc6db..c29a581e8 100644\n--- a/drivers/net/ena/ena_ethdev.c\n+++ b/drivers/net/ena/ena_ethdev.c\n@@ -1703,7 +1703,7 @@ static int eth_ena_dev_uninit(struct rte_eth_dev *eth_dev)\n \t\t(struct ena_adapter *)(eth_dev->data->dev_private);\n \n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n-\t\treturn -EPERM;\n+\t\treturn 0;\n \n \tif (adapter->state != ENA_ADAPTER_STATE_CLOSED)\n \t\tena_close(eth_dev);\ndiff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c\nindex 93e89007a..0f59e4475 100644\n--- a/drivers/net/liquidio/lio_ethdev.c\n+++ b/drivers/net/liquidio/lio_ethdev.c\n@@ -2038,7 +2038,7 @@ lio_eth_dev_uninit(struct rte_eth_dev *eth_dev)\n \tPMD_INIT_FUNC_TRACE();\n \n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n-\t\treturn -EPERM;\n+\t\treturn 0;\n \n \t/* lio_free_sc_buffer_pool */\n \tlio_free_sc_buffer_pool(lio_dev);\ndiff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex 614357da7..0f110fde7 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1697,7 +1697,7 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)\n \tPMD_INIT_FUNC_TRACE();\n \n \tif (rte_eal_process_type() == RTE_PROC_SECONDARY)\n-\t\treturn -EPERM;\n+\t\treturn 0;\n \n \tvirtio_dev_stop(eth_dev);\n \tvirtio_dev_close(eth_dev);\n",
    "prefixes": [
        "v15",
        "5/7"
    ]
}