get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73349,
    "url": "https://patches.dpdk.org/api/patches/73349/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200706205234.8040-11-david.marchand@redhat.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": "<20200706205234.8040-11-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200706205234.8040-11-david.marchand@redhat.com",
    "date": "2020-07-06T20:52:34",
    "name": "[v6,10/10] eal: add multiprocess disable API",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "12b58ec35785c71229968bd9580a53d7f483ea3f",
    "submitter": {
        "id": 1173,
        "url": "https://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200706205234.8040-11-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 10826,
            "url": "https://patches.dpdk.org/api/series/10826/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10826",
            "date": "2020-07-06T20:52:25",
            "name": "Register non-EAL threads as lcore",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/10826/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73349/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/73349/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CD912A00C5;\n\tMon,  6 Jul 2020 22:54:32 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 28F221DD84;\n\tMon,  6 Jul 2020 22:53:50 +0200 (CEST)",
            "from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com\n [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 462E01DD83\n for <dev@dpdk.org>; Mon,  6 Jul 2020 22:53:48 +0200 (CEST)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-152-0213GVknNW-P42l5Qif1pw-1; Mon, 06 Jul 2020 16:53:44 -0400",
            "from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com\n [10.5.11.22])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C2DD4EC1A0;\n Mon,  6 Jul 2020 20:53:41 +0000 (UTC)",
            "from dmarchan.remote.csb (unknown [10.40.195.188])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 3DF5810013D7;\n Mon,  6 Jul 2020 20:53:36 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1594068827;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=sky4Ws/9qM3UAWCKiUVnd7bjuaHfcjU1TXyFyla7Jx8=;\n b=Wxf7gonaXGdfLlSHI9dSod2r19WN4SSm5BHVwtDcNYgwgv4DfXbmMFO2NIMY3VHED+1acS\n oEZBiVKzVVlEbKTYHuvcc8dHLOWs/Jf2BTNtlAdQHQkwhtKRhXeQq7xF5rIKGEVeUmepma\n NabZOgKztaQ1ChtZ5MRF2+eD8OfEDEg=",
        "X-MC-Unique": "0213GVknNW-P42l5Qif1pw-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "jerinjacobk@gmail.com, bruce.richardson@intel.com, mdr@ashroe.eu,\n thomas@monjalon.net, arybchenko@solarflare.com, ktraynor@redhat.com,\n ian.stokes@intel.com, i.maximets@ovn.org, olivier.matz@6wind.com,\n konstantin.ananyev@intel.com, Anatoly Burakov <anatoly.burakov@intel.com>,\n Neil Horman <nhorman@tuxdriver.com>,\n Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,\n Omar Cardona <ocardona@microsoft.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>,\n Ranjit Menon <ranjit.menon@intel.com>",
        "Date": "Mon,  6 Jul 2020 22:52:34 +0200",
        "Message-Id": "<20200706205234.8040-11-david.marchand@redhat.com>",
        "In-Reply-To": "<20200706205234.8040-1-david.marchand@redhat.com>",
        "References": "<20200610144506.30505-1-david.marchand@redhat.com>\n <20200706205234.8040-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.22",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=US-ASCII",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v6 10/10] eal: add multiprocess disable API",
        "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 <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": "The multiprocess feature has been implicitly enabled so far.\nApplications might want to explicitly disable like when using the\nnon-EAL threads registration API.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\nChanges since v5:\n- fixed windows build,\n\n---\n app/test/test_mp_secondary.c              |  7 +++++++\n lib/librte_eal/common/eal_common_proc.c   |  7 +++----\n lib/librte_eal/common/eal_common_thread.c |  2 +-\n lib/librte_eal/common/eal_private.h       |  5 -----\n lib/librte_eal/include/rte_eal.h          | 14 ++++++++++++++\n lib/librte_eal/rte_eal_version.map        |  1 +\n lib/librte_eal/windows/eal.c              |  2 +-\n 7 files changed, 27 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c\nindex ac15ddbf20..3a655c3400 100644\n--- a/app/test/test_mp_secondary.c\n+++ b/app/test/test_mp_secondary.c\n@@ -97,6 +97,13 @@ run_secondary_instances(void)\n \t\t\t(1 << rte_get_master_lcore()));\n \n \tret |= launch_proc(argv1);\n+\tprintf(\"### Testing rte_mp_disable() reject:\\n\");\n+\tif (rte_mp_disable()) {\n+\t\tprintf(\"Error: rte_mp_disable() has been accepted\\n\");\n+\t\tret |= -1;\n+\t} else {\n+\t\tprintf(\"# Checked rte_mp_disable() is refused\\n\");\n+\t}\n \tret |= launch_proc(argv2);\n \n \tret |= !(launch_proc(argv3));\ndiff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c\nindex 10142683f8..d35b9c0380 100644\n--- a/lib/librte_eal/common/eal_common_proc.c\n+++ b/lib/librte_eal/common/eal_common_proc.c\n@@ -1236,10 +1236,9 @@ rte_mp_reply(struct rte_mp_msg *msg, const char *peer)\n \n /* Internally, the status of the mp feature is represented as a three-state:\n  * - \"unknown\" as long as no secondary process attached to a primary process\n- *   and there was no call to eal_disable_multiprocess yet,\n+ *   and there was no call to rte_mp_disable yet,\n  * - \"enabled\" as soon as a secondary process attaches to a primary process,\n- * - \"disabled\" when a primary process successfully called\n- *   eal_disable_multiprocess,\n+ * - \"disabled\" when a primary process successfully called rte_mp_disable,\n  */\n enum mp_status {\n \tMP_STATUS_UNKNOWN,\n@@ -1264,7 +1263,7 @@ set_mp_status(enum mp_status status)\n }\n \n bool\n-eal_disable_multiprocess(void)\n+rte_mp_disable(void)\n {\n \treturn set_mp_status(MP_STATUS_DISABLED);\n }\ndiff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c\nindex ea09a4f3e0..73a055902a 100644\n--- a/lib/librte_eal/common/eal_common_thread.c\n+++ b/lib/librte_eal/common/eal_common_thread.c\n@@ -261,7 +261,7 @@ rte_thread_register(void)\n \t\trte_errno = EINVAL;\n \t\treturn -1;\n \t}\n-\tif (!eal_disable_multiprocess()) {\n+\tif (!rte_mp_disable()) {\n \t\tRTE_LOG(ERR, EAL, \"Multiprocess in use, registering non-EAL threads is not supported.\\n\");\n \t\trte_errno = EINVAL;\n \t\treturn -1;\ndiff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex 535e008474..a917727e41 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -733,11 +733,6 @@ void __rte_thread_init(unsigned int lcore_id, rte_cpuset_t *cpuset);\n  */\n void __rte_thread_uninit(void);\n \n-/**\n- * Mark primary process as not supporting multi-process.\n- */\n-bool eal_disable_multiprocess(void);\n-\n /**\n  * Instruct primary process that a secondary process wants to attach.\n  */\ndiff --git a/lib/librte_eal/include/rte_eal.h b/lib/librte_eal/include/rte_eal.h\nindex 0913d1947c..fc7db2d427 100644\n--- a/lib/librte_eal/include/rte_eal.h\n+++ b/lib/librte_eal/include/rte_eal.h\n@@ -151,6 +151,20 @@ int rte_eal_cleanup(void);\n  */\n int rte_eal_primary_proc_alive(const char *config_file_path);\n \n+/**\n+ * Disable multiprocess.\n+ *\n+ * This function can be called to indicate that multiprocess won't be used for\n+ * the rest of the application life.\n+ *\n+ * @return\n+ *   - true if called from a primary process that had no secondary processes\n+ *     attached,\n+ *   - false, otherwise.\n+ */\n+__rte_experimental\n+bool rte_mp_disable(void);\n+\n #define RTE_MP_MAX_FD_NUM\t8    /* The max amount of fds */\n #define RTE_MP_MAX_NAME_LEN\t64   /* The max length of action name */\n #define RTE_MP_MAX_PARAM_LEN\t256  /* The max length of param */\ndiff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map\nindex 3aeb5b11ab..d17f13f8d3 100644\n--- a/lib/librte_eal/rte_eal_version.map\n+++ b/lib/librte_eal/rte_eal_version.map\n@@ -399,6 +399,7 @@ EXPERIMENTAL {\n \trte_lcore_callback_unregister;\n \trte_lcore_dump;\n \trte_lcore_iterate;\n+\trte_mp_disable;\n \trte_thread_register;\n \trte_thread_unregister;\n };\ndiff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c\nindex 9fc831fe6f..e50601dd36 100644\n--- a/lib/librte_eal/windows/eal.c\n+++ b/lib/librte_eal/windows/eal.c\n@@ -67,7 +67,7 @@ eal_proc_type_detect(void)\n }\n \n bool\n-eal_disable_multiprocess(void)\n+rte_mp_disable(void)\n {\n \treturn true;\n }\n",
    "prefixes": [
        "v6",
        "10/10"
    ]
}