get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 115955,
    "url": "http://patches.dpdk.org/api/patches/115955/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220906080511.46088-1-yidingx.zhou@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": "<20220906080511.46088-1-yidingx.zhou@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220906080511.46088-1-yidingx.zhou@intel.com",
    "date": "2022-09-06T08:05:11",
    "name": "[v2] net/pcap: fix timeout of stopping device",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "89506ace6381e83670df4efb2d9eebebf66608da",
    "submitter": {
        "id": 2501,
        "url": "http://patches.dpdk.org/api/people/2501/?format=api",
        "name": "Yiding Zhou",
        "email": "yidingx.zhou@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220906080511.46088-1-yidingx.zhou@intel.com/mbox/",
    "series": [
        {
            "id": 24551,
            "url": "http://patches.dpdk.org/api/series/24551/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24551",
            "date": "2022-09-06T08:05:11",
            "name": "[v2] net/pcap: fix timeout of stopping device",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/24551/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/115955/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/115955/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 052E6A054A;\n\tTue,  6 Sep 2022 10:03:39 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EC1DD40143;\n\tTue,  6 Sep 2022 10:03:38 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id B773940143;\n Tue,  6 Sep 2022 10:03:36 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Sep 2022 01:03:32 -0700",
            "from unknown (HELO dpdkserver..) ([10.239.252.174])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Sep 2022 01:03:28 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1662451417; x=1693987417;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=XIZh/lLcR5L3ZjSVPwNFzG7J0LS/6wpJh5spnksjnRE=;\n b=QZ1WGL5fKS861P4bqf6ehrl5NuhtPcCy/xHaMbazTxvGvWKGWb/W5jQ9\n VYSp/yovLBCXqPD35KFQ9FsMwksQHHozbd42NqwMAxtNaelwSOWY7fc5d\n LzjaRY5dpkpxRjvCwZ0Lbh9QiDDTMGPIr6R2aYXfLuK0tXTDIzSM+Ioli\n a9sRQXNvUSnFeGKT4twNP8aZ3nGl15nUwzFVzDZ11oW+Sk9Kc8JCx5H29\n gWv3XExfasQTZaczz7P4lg0K9B5V07glGNlFSvIBVaVi0YJkGPpSvm0lF\n R12DJuE35eX34A96tA3JjnpydoFMMrLq3aZHArdGQrLmlMktqUxGPcpip A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10461\"; a=\"297317415\"",
            "E=Sophos;i=\"5.93,293,1654585200\"; d=\"scan'208\";a=\"297317415\"",
            "E=Sophos;i=\"5.93,293,1654585200\"; d=\"scan'208\";a=\"644065355\""
        ],
        "From": "Yiding Zhou <yidingx.zhou@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, anatoly.burakov@intel.com, xingguang.he@intel.com,\n Yiding Zhou <yidingx.zhou@intel.com>, stable@dpdk.org",
        "Subject": "[PATCH v2] net/pcap: fix timeout of stopping device",
        "Date": "Tue,  6 Sep 2022 16:05:11 +0800",
        "Message-Id": "<20220906080511.46088-1-yidingx.zhou@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220825072041.10768-1-yidingx.zhou@intel.com>",
        "References": "<20220825072041.10768-1-yidingx.zhou@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "The pcap file will be synchronized to the disk when stopping the device.\nIt takes a long time if the file is large that would cause the\n'detach sync request' timeout when the device is closed under multi-process\nscenario.\n\nThis commit fixes the issue by using alarm handler to release dumper.\n\nFixes: 0ecfb6c04d54 (\"net/pcap: move handler to process private\")\nCc: stable@dpdk.org\n\nSigned-off-by: Yiding Zhou <yidingx.zhou@intel.com>\n\n---\nv2: use alarm handler to release dumper\n---\n drivers/net/pcap/pcap_ethdev.c | 22 +++++++++++++++++++++-\n 1 file changed, 21 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c\nindex ec29fd6bc5..5c643a0277 100644\n--- a/drivers/net/pcap/pcap_ethdev.c\n+++ b/drivers/net/pcap/pcap_ethdev.c\n@@ -17,6 +17,7 @@\n #include <rte_mbuf_dyn.h>\n #include <rte_bus_vdev.h>\n #include <rte_os_shim.h>\n+#include <rte_alarm.h>\n \n #include \"pcap_osdep.h\"\n \n@@ -664,6 +665,25 @@ eth_dev_start(struct rte_eth_dev *dev)\n \treturn 0;\n }\n \n+static void eth_pcap_dumper_release(void *arg)\n+{\n+\tpcap_dump_close((pcap_dumper_t *)arg);\n+}\n+\n+static void\n+eth_pcap_dumper_close(pcap_dumper_t *dumper)\n+{\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n+\t\t/*\n+\t\t * Delay 30 seconds before releasing dumper to wait for file sync\n+\t\t * to complete to avoid blocking alarm thread in PRIMARY process\n+\t\t */\n+\t\trte_eal_alarm_set(30000000, eth_pcap_dumper_release, dumper);\n+\t} else {\n+\t\trte_eal_alarm_set(1, eth_pcap_dumper_release, dumper);\n+\t}\n+}\n+\n /*\n  * This function gets called when the current port gets stopped.\n  * Is the only place for us to close all the tx streams dumpers.\n@@ -689,7 +709,7 @@ eth_dev_stop(struct rte_eth_dev *dev)\n \n \tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n \t\tif (pp->tx_dumper[i] != NULL) {\n-\t\t\tpcap_dump_close(pp->tx_dumper[i]);\n+\t\t\teth_pcap_dumper_close(pp->tx_dumper[i]);\n \t\t\tpp->tx_dumper[i] = NULL;\n \t\t}\n \n",
    "prefixes": [
        "v2"
    ]
}