get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 30428,
    "url": "http://patches.dpdk.org/api/patches/30428/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1508154348-10988-3-git-send-email-tdu@semihalf.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": "<1508154348-10988-3-git-send-email-tdu@semihalf.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1508154348-10988-3-git-send-email-tdu@semihalf.com",
    "date": "2017-10-16T11:45:48",
    "name": "[dpdk-dev,2/2] examples/kni: stop lcores while doing kni ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "c037e3abbe92e63a5a0d37cc03be1ba51d7e27d3",
    "submitter": {
        "id": 846,
        "url": "http://patches.dpdk.org/api/people/846/?format=api",
        "name": "Tomasz Duszynski",
        "email": "tdu@semihalf.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/1508154348-10988-3-git-send-email-tdu@semihalf.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/30428/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/30428/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 1CDB71B6D0;\n\tMon, 16 Oct 2017 13:46:05 +0200 (CEST)",
            "from mail-lf0-f49.google.com (mail-lf0-f49.google.com\n\t[209.85.215.49]) by dpdk.org (Postfix) with ESMTP id A0D851B6C8\n\tfor <dev@dpdk.org>; Mon, 16 Oct 2017 13:46:02 +0200 (CEST)",
            "by mail-lf0-f49.google.com with SMTP id w21so9000551lfc.6\n\tfor <dev@dpdk.org>; Mon, 16 Oct 2017 04:46:02 -0700 (PDT)",
            "from tdu.semihalf.local (31-172-191-173.noc.fibertech.net.pl.\n\t[31.172.191.173]) by smtp.gmail.com with ESMTPSA id\n\tc23sm1469607lfh.65.2017.10.16.04.46.00\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 16 Oct 2017 04:46:00 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=semihalf-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=54OO4Ts+SNHskwb6mNp92+vqmklSCbJJMYYfNwFTOW4=;\n\tb=wL79qO0tEd2SrI/Ul8cQPA2F9QF/7gojJIIY/MlkHAZzAicWPa11PWnV1+Toe/taM2\n\tND9rUB3h6WBuV7A063BRVqxdCFcMeSHSfeexpdrFPcnVFFHX62qFwy2zQrjNeWB99LEP\n\tcIMhcx1lyGL6i3OYU3sBGppxKvxKkDrozGHGZqaBiVyO+7VAIfszjzbn1fkXk4cvK3Nq\n\tHD68qLKZH0aiSQPOFxRW0LOEYClWR3J7H73LoWsQRarT0X1Wdi2ayU368aBARD0N5qvZ\n\tB+qkEJy3ph3D26Okp4WRtOwNYwjRxm5HatMvF6xUTjSXNEc/C/bqiwwQTEHKjcZmrepe\n\t2r5g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=54OO4Ts+SNHskwb6mNp92+vqmklSCbJJMYYfNwFTOW4=;\n\tb=i+nuqyrTuP6hrt6Wlc3UX4tqElWISc4AYjUxwsgn0TQHW0BeO/XA+AZZzQ9I0r4QSV\n\tYBdK8wbnAYd6mVgEojxkSiN18s5BySAXM17+BiwKy10LOIkWeh+y+XfAYUdLC2UqOSs8\n\tjq10N4ZBGXRb1dspxKD61x3XzCt7t7F1ZEfT4u6PH8nhhLvnCX4REKkNSrjWfXe6aR4l\n\tMNG+bVV8h+Lf0iLqcsOQjzZlOg4YfpA4SQZkMuNfJ2osE6SrfYMY7FRPY9uCB6IHwYO5\n\tIc0I7yspele7UqqmH8VVP/w6OdIIsvwDgKMPz3Dr0O6uCOLWBMgVXsNBHgVA7jOMFlYX\n\tWkjw==",
        "X-Gm-Message-State": "AMCzsaVwV+30aRIhmHDM7PulunMZmOU6xo+gkrkHkiWpqrWru3HyaXww\n\ty2+uYrBFacOrHlD0m9UQCR6AJ9WPJNM=",
        "X-Google-Smtp-Source": "ABhQp+SZs31cpjNb85c53HCTg+HCsrD3Lbz6fU3LLPkWtnBb9SjVzxW0mkcJ73gdu/+J7kcfghS1jg==",
        "X-Received": "by 10.25.80.23 with SMTP id e23mr2454215lfb.160.1508154361491;\n\tMon, 16 Oct 2017 04:46:01 -0700 (PDT)",
        "From": "Tomasz Duszynski <tdu@semihalf.com>",
        "To": "dev@dpdk.org",
        "Cc": "Tomasz Duszynski <tdu@semihalf.com>",
        "Date": "Mon, 16 Oct 2017 13:45:48 +0200",
        "Message-Id": "<1508154348-10988-3-git-send-email-tdu@semihalf.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1508154348-10988-1-git-send-email-tdu@semihalf.com>",
        "References": "<1508154348-10988-1-git-send-email-tdu@semihalf.com>",
        "Subject": "[dpdk-dev] [PATCH 2/2] examples/kni: stop lcores while doing kni ops",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Since the transmit and receive functions should not be invoked when\nthe device is stopped, stop lcores during kni ops and restart them\nafter device is started once again.\n\nSigned-off-by: Tomasz Duszynski <tdu@semihalf.com>\n---\n examples/kni/main.c | 28 ++++++++++++++++++++++++++++\n 1 file changed, 28 insertions(+)\n\n--\n2.7.4",
    "diff": "diff --git a/examples/kni/main.c b/examples/kni/main.c\nindex cb48fb5..5c50448 100644\n--- a/examples/kni/main.c\n+++ b/examples/kni/main.c\n@@ -166,6 +166,23 @@ static int kni_change_mtu(uint16_t port_id, unsigned int new_mtu);\n static int kni_config_network_interface(uint16_t port_id, uint8_t if_up);\n\n static rte_atomic32_t kni_stop = RTE_ATOMIC32_INIT(0);\n+static rte_atomic32_t kni_restart = RTE_ATOMIC32_INIT(0);\n+\n+static void\n+kni_stop_lcores(void)\n+{\n+\tunsigned int i;\n+\n+\trte_atomic32_inc(&kni_restart);\n+\trte_atomic32_inc(&kni_stop);\n+\n+\tRTE_LCORE_FOREACH(i) {\n+\t\tif (i == rte_lcore_id())\n+\t\t\tcontinue;\n+\n+\t\trte_eal_wait_lcore(i);\n+\t}\n+}\n\n /* Print out statistics on packets handled */\n static void\n@@ -712,6 +729,7 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)\n\n \tRTE_LOG(INFO, APP, \"Change MTU of port %d to %u\\n\", port_id, new_mtu);\n\n+\tkni_stop_lcores();\n \t/* Stop specific port */\n \trte_eth_dev_stop(port_id);\n\n@@ -755,6 +773,8 @@ kni_config_network_interface(uint16_t port_id, uint8_t if_up)\n \tRTE_LOG(INFO, APP, \"Configure network interface of %d %s\\n\",\n \t\t\t\t\tport_id, if_up ? \"up\" : \"down\");\n\n+\tkni_stop_lcores();\n+\n \tif (if_up != 0) { /* Configure network interface up */\n \t\trte_eth_dev_stop(port_id);\n \t\tret = rte_eth_dev_start(port_id);\n@@ -911,6 +931,7 @@ main(int argc, char** argv)\n \t}\n \tcheck_all_ports_link_status(nb_sys_ports, ports_mask);\n\n+restart:\n \t/* Launch per-lcore function on every lcore */\n \trte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);\n \tRTE_LCORE_FOREACH_SLAVE(i) {\n@@ -918,6 +939,13 @@ main(int argc, char** argv)\n \t\t\treturn -1;\n \t}\n\n+\tif (rte_atomic32_read(&kni_restart)) {\n+\t\trte_atomic32_dec(&kni_stop);\n+\t\trte_atomic32_dec(&kni_restart);\n+\n+\t\tgoto restart;\n+\t}\n+\n \t/* Release resources */\n \tfor (port = 0; port < nb_sys_ports; port++) {\n \t\tif (!(ports_mask & (1 << port)))\n",
    "prefixes": [
        "dpdk-dev",
        "2/2"
    ]
}