get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86585,
    "url": "https://patches.dpdk.org/api/patches/86585/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210114103101.738262-4-feifei.wang2@arm.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20210114103101.738262-4-feifei.wang2@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210114103101.738262-4-feifei.wang2@arm.com",
    "date": "2021-01-14T10:31:01",
    "name": "[v4,3/3] examples/eventdev: move eth stop to the end",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9db4bf09dacdb93175aef3f7138e0919b12d2189",
    "submitter": {
        "id": 1771,
        "url": "https://patches.dpdk.org/api/people/1771/?format=api",
        "name": "Feifei Wang",
        "email": "feifei.wang2@arm.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210114103101.738262-4-feifei.wang2@arm.com/mbox/",
    "series": [
        {
            "id": 14749,
            "url": "https://patches.dpdk.org/api/series/14749/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14749",
            "date": "2021-01-14T10:30:58",
            "name": "fix bugs for examples/evnentdev",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/14749/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/86585/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/86585/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 16246A0A02;\n\tThu, 14 Jan 2021 11:31:38 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 87F9B1410FF;\n\tThu, 14 Jan 2021 11:31:25 +0100 (CET)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 92B091410FF;\n Thu, 14 Jan 2021 11:31:23 +0100 (CET)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1CF991FB;\n Thu, 14 Jan 2021 02:31:23 -0800 (PST)",
            "from net-x86-dell-8268.shanghai.arm.com\n (net-x86-dell-8268.shanghai.arm.com [10.169.210.127])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DCF7A3F70D;\n Thu, 14 Jan 2021 02:31:19 -0800 (PST)"
        ],
        "From": "Feifei Wang <feifei.wang2@arm.com>",
        "To": "Harry van Haaren <harry.van.haaren@intel.com>,\n Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>,\n Nikhil Rao <nikhil.rao@intel.com>",
        "Cc": "dev@dpdk.org, nd@arm.com, Feifei Wang <feifei.wang2@arm.com>,\n pbhagavatula@marvell.com, stable@dpdk.org,\n Ruifeng Wang <ruifeng.wang@arm.com>,\n Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "Date": "Thu, 14 Jan 2021 18:31:01 +0800",
        "Message-Id": "<20210114103101.738262-4-feifei.wang2@arm.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210114103101.738262-1-feifei.wang2@arm.com>",
        "References": "<20201221053454.47307-1-feifei.wang2@arm.com>\n <20210114103101.738262-1-feifei.wang2@arm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 3/3] examples/eventdev: move eth stop to the\n end",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Move eth stop code from \"signal_handler\" function to the end of \"main\"\nfunction. There are two reasons for this:\n\nFirst, this improves code maintenance and makes code look simple and\nclear. Based on this change, after receiving the interrupt signal,\n\"fdata->done\" is set as 1. Then the main thread will wait all worker\nlcores to jump out of the loop. Finally, the main thread will stop and\nthen close eth dev port.\n\nSecond, for older version, the main thread first stops eth dev port and\nthen waits the end of worker lcore. This may cause errors because it may\nstop the eth dev port which worker lcores are using. This moving change\ncan fix this by waiting all worker threads to exit and then stop the\neth dev port.\n\nIn the meanwhile, remove wmb in signal_handler.\n\nThis is because when the main lcore receive the stop signal, it stores 1\ninto fdata->done. And then the worker lcores load \"fdata->done\" and jump\nout of the loop to stop running. Nothing should be stored after updating\nfdata->done, so the wmb is unnecessary.\n\nFixes: 085edac2ca38 (\"examples/eventdev_pipeline: support Tx adapter\")\nCc: pbhagavatula@marvell.com\nCc: stable@dpdk.org\n\nSuggested-by: Ruifeng Wang <ruifeng.wang@arm.com>\nSigned-off-by: Feifei Wang <feifei.wang2@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\nReviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\nAcked-by: Harry van Haaren <harry.van.haaren@intel.com>\n---\n examples/eventdev_pipeline/main.c | 16 ++++------------\n 1 file changed, 4 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c\nindex 3526d4d3d..4621e8a89 100644\n--- a/examples/eventdev_pipeline/main.c\n+++ b/examples/eventdev_pipeline/main.c\n@@ -311,7 +311,6 @@ static void\n signal_handler(int signum)\n {\n \tstatic uint8_t once;\n-\tuint16_t portid;\n \n \tif (fdata->done)\n \t\trte_exit(1, \"Exiting on signal %d\\n\", signum);\n@@ -322,17 +321,6 @@ signal_handler(int signum)\n \t\t\trte_event_dev_dump(0, stdout);\n \t\tonce = 1;\n \t\tfdata->done = 1;\n-\t\trte_smp_wmb();\n-\n-\t\tRTE_ETH_FOREACH_DEV(portid) {\n-\t\t\trte_event_eth_rx_adapter_stop(portid);\n-\t\t\trte_event_eth_tx_adapter_stop(portid);\n-\t\t\tif (rte_eth_dev_stop(portid) < 0)\n-\t\t\t\tprintf(\"Failed to stop port %u\", portid);\n-\t\t}\n-\n-\t\trte_eal_mp_wait_lcore();\n-\n \t}\n \tif (signum == SIGTSTP)\n \t\trte_event_dev_dump(0, stdout);\n@@ -483,6 +471,10 @@ main(int argc, char **argv)\n \t}\n \n \tRTE_ETH_FOREACH_DEV(portid) {\n+\t\trte_event_eth_rx_adapter_stop(portid);\n+\t\trte_event_eth_tx_adapter_stop(portid);\n+\t\tif (rte_eth_dev_stop(portid) < 0)\n+\t\t\tprintf(\"Failed to stop port %u\", portid);\n \t\trte_eth_dev_close(portid);\n \t}\n \n",
    "prefixes": [
        "v4",
        "3/3"
    ]
}