get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 133792,
    "url": "http://patchwork.dpdk.org/api/patches/133792/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1698949164-20287-1-git-send-email-rahulgupt@linux.microsoft.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<1698949164-20287-1-git-send-email-rahulgupt@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1698949164-20287-1-git-send-email-rahulgupt@linux.microsoft.com",
    "date": "2023-11-02T18:19:24",
    "name": "[RFC] eal: RFC to refactor rte_eal_init into sub-functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a7fb39d7a2d37e76a635870779db3e47a6413f76",
    "submitter": {
        "id": 3218,
        "url": "http://patchwork.dpdk.org/api/people/3218/?format=api",
        "name": "Rahul Gupta",
        "email": "rahulgupt@linux.microsoft.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1698949164-20287-1-git-send-email-rahulgupt@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 30122,
            "url": "http://patchwork.dpdk.org/api/series/30122/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30122",
            "date": "2023-11-02T18:19:24",
            "name": "[RFC] eal: RFC to refactor rte_eal_init into sub-functions",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/30122/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/133792/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/133792/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 AD52443270;\n\tThu,  2 Nov 2023 19:19:46 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9181F40262;\n\tThu,  2 Nov 2023 19:19:46 +0100 (CET)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 3BB9740144\n for <dev@dpdk.org>; Thu,  2 Nov 2023 19:19:45 +0100 (CET)",
            "by linux.microsoft.com (Postfix, from userid 1179)\n id 949ED20B74C0; Thu,  2 Nov 2023 11:19:44 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 949ED20B74C0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1698949184;\n bh=McAqYfRJhqxX4+cN2fZcD4MRjD4hB29K+1xObF0i71U=;\n h=From:To:Cc:Subject:Date:From;\n b=DiD8lRbMB4SAoOLLgDDBrQGyfYGtE1DJdr1/rKNJD/bQulyc0+rM9dVNwv/KAUKEu\n wJiPRHfosppXV2dL4tIjLYSrjOn2BFv1GERQIp0bmUIJ1eQCvGJbS/zASFBPrZXExs\n sJFYlBttb7FK3zmwMs/8Wo4jvUkUgVarIY7vXTJM=",
        "From": "Rahul Gupta <rahulgupt@linux.microsoft.com>",
        "To": "dev@dpdk.org,\n\tthomas@monjalon.net",
        "Cc": "sovaradh@linux.microsoft.com, okaya@kernel.org,\n sujithsankar@microsoft.com,\n sowmini.varadhan@microsoft.com, rahulrgupta27@gmail.com,\n Rahul Gupta <rahulgupt@microsoft.com>,\n Rahul Gupta <rahulgupt@linux.microsoft.com>",
        "Subject": "[RFC] eal: RFC to refactor rte_eal_init into sub-functions",
        "Date": "Thu,  2 Nov 2023 11:19:24 -0700",
        "Message-Id": "<1698949164-20287-1-git-send-email-rahulgupt@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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": "From: Rahul Gupta <rahulgupt@microsoft.com>\n\nInitialization often requires rte_eal_init + rte_pktmbuf_pool_create\nwhich can consume a total time of 500-600 ms:\na) For many devices FLR may take a significant chunk of time\n   (200-250 ms in our use-case), this FLR is triggered during device\n   probe in rte_eal_init().\nb) rte_pktmbuf_pool_create() can consume upto 300-350 ms for\napplications that require huge memory.\n\nThis cost is incurred on each restart (which happens in our use-case\nduring binary updates for servicing).\nThis patch provides an optimization using pthreads that appplications\ncan use and which can save 200-230ms.\n\nIn this patch, rte_eal_init() is refactored into two parts-\na) 1st part is dependent code ie- it’s a perquisite of the FLR and\n   mempool creation. So this code needs to be executed before any\n   pthreads. Its named as rte_eal_init_setup()\nb) 2nd part of code is independent code ie- it can execute in parallel\n   to mempool creation in a pthread. Its named as rte_probe_and_ioctl().\n\nExisting applications require no changes unless they wish to leverage\nthe optimization.\n\nIf the application wants to use pthread functionality, it should call-\na) rte_eal_init_setup() then create two or more pthreads-\nb) in one pthread call- rte_probe_and_ioctl(),\nc) second pthread call- rte_pktmbuf_pool_create()\nd) (optional) Other pthreads for  any other independent function.\n\nSigned-off-by: Rahul Gupta <rahulgupt@linux.microsoft.com>\n---\n lib/librte_eal/common/include/rte_eal.h |  2 ++\n lib/librte_eal/linux/eal/eal.c          | 18 ++++++++++++++++--\n lib/librte_eal/rte_eal_version.map      |  2 ++\n 3 files changed, 20 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h\nindex 2f9ed29..90db16b 100644\n--- a/lib/librte_eal/common/include/rte_eal.h\n+++ b/lib/librte_eal/common/include/rte_eal.h\n@@ -129,6 +129,8 @@ enum rte_proc_type_t {\n  *     ENOEXEC indicates that a service core failed to launch successfully.\n  */\n int rte_eal_init(int argc, char **argv);\n+int rte_eal_init_setup(int argc, char **argv);\n+int rte_probe_and_ioctl(void);\n \n /**\n  * Clean up the Environment Abstraction Layer (EAL)\ndiff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c\nindex 5cabba8..6f2a4d0 100644\n--- a/lib/librte_eal/linux/eal/eal.c\n+++ b/lib/librte_eal/linux/eal/eal.c\n@@ -956,9 +956,8 @@ static void rte_eal_init_alert(const char *msg)\n \treturn n > 2;\n }\n \n-/* Launch threads, called at application init(). */\n int\n-rte_eal_init(int argc, char **argv)\n+rte_eal_init_setup(int argc, char **argv)\n {\n \tint i, fctret, ret;\n \tpthread_t thread_id;\n@@ -1246,7 +1245,13 @@ static void rte_eal_init_alert(const char *msg)\n \t */\n \trte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);\n \trte_eal_mp_wait_lcore();\n+\treturn fctret;\n+}\n \n+int\n+rte_probe_and_ioctl(void)\n+{\n+\tint ret = 0;\n \t/* initialize services so vdevs register service during bus_probe. */\n \tret = rte_service_init();\n \tif (ret) {\n@@ -1296,7 +1301,16 @@ static void rte_eal_init_alert(const char *msg)\n \n \t/* Call each registered callback, if enabled */\n \trte_option_init();\n+\treturn 0;\t//return Success if control reaches here\n+}\n \n+/* Launch threads, called at application init(). */\n+int\n+rte_eal_init(int argc, char **argv)\n+{\n+\tint fctret = rte_eal_init_setup(argc, argv);\n+\tif (fctret>=0)\n+\t\tfctret = rte_probe_and_ioctl();\n \treturn fctret;\n }\n \ndiff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map\nindex 6482539..9e6054f 100644\n--- a/lib/librte_eal/rte_eal_version.map\n+++ b/lib/librte_eal/rte_eal_version.map\n@@ -53,6 +53,8 @@ DPDK_20.0 {\n \trte_eal_hotplug_remove;\n \trte_eal_hpet_init;\n \trte_eal_init;\n+\trte_eal_init_setup;\n+\trte_probe_and_ioctl;\n \trte_eal_iopl_init;\n \trte_eal_iova_mode;\n \trte_eal_lcore_role;\n",
    "prefixes": [
        "RFC"
    ]
}