get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56163,
    "url": "http://patches.dpdk.org/api/patches/56163/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/4d42544cf722666e493a236d5a1065c57726e8fa.1562332112.git.anatoly.burakov@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": "<4d42544cf722666e493a236d5a1065c57726e8fa.1562332112.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/4d42544cf722666e493a236d5a1065c57726e8fa.1562332112.git.anatoly.burakov@intel.com",
    "date": "2019-07-05T13:10:34",
    "name": "[v4,8/8] eal: unify internal config initialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "98c13f13f1619320a59e1e3210c76880f2f147a4",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/4d42544cf722666e493a236d5a1065c57726e8fa.1562332112.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 5369,
            "url": "http://patches.dpdk.org/api/series/5369/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5369",
            "date": "2019-07-05T13:10:26",
            "name": "Make shared memory config non-public",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/5369/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/56163/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/56163/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 1F37E1BEFA;\n\tFri,  5 Jul 2019 15:11:06 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 271C41BEE3\n\tfor <dev@dpdk.org>; Fri,  5 Jul 2019 15:10:59 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Jul 2019 06:10:59 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.125])\n\tby fmsmga004.fm.intel.com with ESMTP; 05 Jul 2019 06:10:58 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.63,455,1557212400\"; d=\"scan'208\";a=\"187863059\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>, thomas@monjalon.net,\n\tdavid.marchand@redhat.com, stephen@networkplumber.org",
        "Date": "Fri,  5 Jul 2019 14:10:34 +0100",
        "Message-Id": "<4d42544cf722666e493a236d5a1065c57726e8fa.1562332112.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": [
            "<cover.1562332112.git.anatoly.burakov@intel.com>",
            "<cover.1562332112.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1562332112.git.anatoly.burakov@intel.com>",
            "<cover.1561635481.git.anatoly.burakov@intel.com>\n\t<cover.1562332112.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v4 8/8] eal: unify internal config initialization",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Currently, each EAL will update internal/shared config in their\nown way at init, resulting in needless duplication of code and\nOS-dependent behavior. Move the functions to a common file and\nadd missing FreeBSD steps.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nAcked-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_eal/common/eal_common_mcfg.c | 18 ++++++++++++++++++\n lib/librte_eal/common/eal_memcfg.h      |  8 ++++++++\n lib/librte_eal/freebsd/eal/eal.c        |  2 ++\n lib/librte_eal/linux/eal/eal.c          | 22 ++--------------------\n 4 files changed, 30 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_mcfg.c b/lib/librte_eal/common/eal_common_mcfg.c\nindex dc6665d6a..fe8d2b726 100644\n--- a/lib/librte_eal/common/eal_common_mcfg.c\n+++ b/lib/librte_eal/common/eal_common_mcfg.c\n@@ -31,6 +31,24 @@ eal_mcfg_wait_complete(void)\n \t\trte_pause();\n }\n \n+void\n+eal_mcfg_update_internal(void)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\n+\tinternal_config.legacy_mem = mcfg->legacy_mem;\n+\tinternal_config.single_file_segments = mcfg->single_file_segments;\n+}\n+\n+void\n+eal_mcfg_update_from_internal(void)\n+{\n+\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n+\n+\tmcfg->legacy_mem = internal_config.legacy_mem;\n+\tmcfg->single_file_segments = internal_config.single_file_segments;\n+}\n+\n void\n rte_mcfg_mem_read_lock(void)\n {\ndiff --git a/lib/librte_eal/common/eal_memcfg.h b/lib/librte_eal/common/eal_memcfg.h\nindex 417324aab..573233896 100644\n--- a/lib/librte_eal/common/eal_memcfg.h\n+++ b/lib/librte_eal/common/eal_memcfg.h\n@@ -69,6 +69,14 @@ struct rte_mem_config {\n \tuint8_t dma_maskbits; /**< Keeps the more restricted dma mask. */\n };\n \n+/* update internal config from shared mem config */\n+void\n+eal_mcfg_update_internal(void);\n+\n+/* update shared mem config from internal config */\n+void\n+eal_mcfg_update_from_internal(void);\n+\n /* wait until primary process initialization is complete */\n void\n eal_mcfg_wait_complete(void);\ndiff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c\nindex 340f7dd6c..ec1650c43 100644\n--- a/lib/librte_eal/freebsd/eal/eal.c\n+++ b/lib/librte_eal/freebsd/eal/eal.c\n@@ -379,6 +379,7 @@ rte_config_init(void)\n \tcase RTE_PROC_PRIMARY:\n \t\tif (rte_eal_config_create() < 0)\n \t\t\treturn -1;\n+\t\teal_mcfg_update_from_internal();\n \t\tbreak;\n \tcase RTE_PROC_SECONDARY:\n \t\tif (rte_eal_config_attach() < 0)\n@@ -386,6 +387,7 @@ rte_config_init(void)\n \t\teal_mcfg_wait_complete();\n \t\tif (rte_eal_config_reattach() < 0)\n \t\t\treturn -1;\n+\t\teal_mcfg_update_internal();\n \t\tbreak;\n \tcase RTE_PROC_AUTO:\n \tcase RTE_PROC_INVALID:\ndiff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c\nindex e15eacffc..445d72f0c 100644\n--- a/lib/librte_eal/linux/eal/eal.c\n+++ b/lib/librte_eal/linux/eal/eal.c\n@@ -473,24 +473,6 @@ eal_proc_type_detect(void)\n \treturn ptype;\n }\n \n-/* copies data from internal config to shared config */\n-static void\n-eal_update_mem_config(void)\n-{\n-\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n-\tmcfg->legacy_mem = internal_config.legacy_mem;\n-\tmcfg->single_file_segments = internal_config.single_file_segments;\n-}\n-\n-/* copies data from shared config to internal config */\n-static void\n-eal_update_internal_config(void)\n-{\n-\tstruct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n-\tinternal_config.legacy_mem = mcfg->legacy_mem;\n-\tinternal_config.single_file_segments = mcfg->single_file_segments;\n-}\n-\n /* Sets up rte_config structure with the pointer to shared memory config.*/\n static int\n rte_config_init(void)\n@@ -501,7 +483,7 @@ rte_config_init(void)\n \tcase RTE_PROC_PRIMARY:\n \t\tif (rte_eal_config_create() < 0)\n \t\t\treturn -1;\n-\t\teal_update_mem_config();\n+\t\teal_mcfg_update_from_internal();\n \t\tbreak;\n \tcase RTE_PROC_SECONDARY:\n \t\tif (rte_eal_config_attach() < 0)\n@@ -509,7 +491,7 @@ rte_config_init(void)\n \t\teal_mcfg_wait_complete();\n \t\tif (rte_eal_config_reattach() < 0)\n \t\t\treturn -1;\n-\t\teal_update_internal_config();\n+\t\teal_mcfg_update_internal();\n \t\tbreak;\n \tcase RTE_PROC_AUTO:\n \tcase RTE_PROC_INVALID:\n",
    "prefixes": [
        "v4",
        "8/8"
    ]
}