get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55354,
    "url": "http://patches.dpdk.org/api/patches/55354/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/0fdd08d79feb1b60c304a1194d14282238cb679e.1561477829.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": "<0fdd08d79feb1b60c304a1194d14282238cb679e.1561477829.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/0fdd08d79feb1b60c304a1194d14282238cb679e.1561477829.git.anatoly.burakov@intel.com",
    "date": "2019-06-25T15:50:42",
    "name": "[2/2] eal/freebsd: add config reattach",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c85b7f055cae8ee71b9f21f4e18f4c58dcfef83e",
    "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/0fdd08d79feb1b60c304a1194d14282238cb679e.1561477829.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 5161,
            "url": "http://patches.dpdk.org/api/series/5161/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5161",
            "date": "2019-06-25T15:50:41",
            "name": "[1/2] eal/freebsd: fix missing write to internal config",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/5161/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55354/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55354/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 D07B11BA68;\n\tTue, 25 Jun 2019 17:50:50 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id C59BF1B9FA;\n\tTue, 25 Jun 2019 17:50:46 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jun 2019 08:50:45 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.125])\n\tby orsmga003.jf.intel.com with ESMTP; 25 Jun 2019 08:50:44 -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,416,1557212400\"; d=\"scan'208\";a=\"164027957\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>,\n\tstable@dpdk.org",
        "Date": "Tue, 25 Jun 2019 16:50:42 +0100",
        "Message-Id": "<0fdd08d79feb1b60c304a1194d14282238cb679e.1561477829.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": [
            "<f4c041a147e3b6b29d70e056653fd3c163e1d4ce.1561477829.git.anatoly.burakov@intel.com>",
            "<f4c041a147e3b6b29d70e056653fd3c163e1d4ce.1561477829.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<f4c041a147e3b6b29d70e056653fd3c163e1d4ce.1561477829.git.anatoly.burakov@intel.com>",
            "<f4c041a147e3b6b29d70e056653fd3c163e1d4ce.1561477829.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH 2/2] eal/freebsd: add config reattach",
        "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": "Linux EAL will attach the shared config at an arbitrary address,\nfind out where the shared config is mapped in the primary, and\nthen will reattach it at that exact address.\n\nFreeBSD version doesn't seem to go for that extra reattach step,\nwhich makes one wonder how did it ever work in the first place.\n\nFix the FreeBSD init to also reattach shared config to the exact\nsame place the primary process has it.\n\nFixes: 764bf26873b9 (\"add FreeBSD support\")\nCc: bruce.richardson@intel.com\nCc: stable@dpdk.org\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/freebsd/eal/eal.c | 36 ++++++++++++++++++++++++++++++++\n 1 file changed, 36 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c\nindex 8c399c799..ce7a5f91d 100644\n--- a/lib/librte_eal/freebsd/eal/eal.c\n+++ b/lib/librte_eal/freebsd/eal/eal.c\n@@ -280,6 +280,41 @@ rte_eal_config_attach(void)\n \trte_config.mem_config = rte_mem_cfg_addr;\n }\n \n+/* reattach the shared config at exact memory location primary process has it */\n+static void\n+rte_eal_config_reattach(void)\n+{\n+\tstruct rte_mem_config *mem_config;\n+\tvoid *rte_mem_cfg_addr;\n+\n+\tif (internal_config.no_shconf)\n+\t\treturn;\n+\n+\t/* save the address primary process has mapped shared config to */\n+\trte_mem_cfg_addr =\n+\t\t\t(void *)(uintptr_t)rte_config.mem_config->mem_cfg_addr;\n+\n+\t/* unmap original config */\n+\tmunmap(rte_config.mem_config, sizeof(struct rte_mem_config));\n+\n+\t/* remap the config at proper address */\n+\tmem_config = (struct rte_mem_config *) mmap(rte_mem_cfg_addr,\n+\t\t\tsizeof(*mem_config), PROT_READ | PROT_WRITE, MAP_SHARED,\n+\t\t\tmem_cfg_fd, 0);\n+\tif (mem_config == MAP_FAILED || mem_config != rte_mem_cfg_addr) {\n+\t\tif (mem_config != MAP_FAILED)\n+\t\t\t/* errno is stale, don't use */\n+\t\t\trte_panic(\"Cannot mmap memory for rte_config at [%p], got [%p]\\n\",\n+\t\t\t\t  rte_mem_cfg_addr, mem_config);\n+\t\telse\n+\t\t\trte_panic(\"Cannot mmap memory for rte_config! error %i (%s)\\n\",\n+\t\t\t\t  errno, strerror(errno));\n+\t}\n+\tclose(mem_cfg_fd);\n+\n+\trte_config.mem_config = mem_config;\n+}\n+\n /* Detect if we are a primary or a secondary process */\n enum rte_proc_type_t\n eal_proc_type_detect(void)\n@@ -318,6 +353,7 @@ rte_config_init(void)\n \tcase RTE_PROC_SECONDARY:\n \t\trte_eal_config_attach();\n \t\trte_eal_mcfg_wait_complete(rte_config.mem_config);\n+\t\trte_eal_config_reattach();\n \t\tbreak;\n \tcase RTE_PROC_AUTO:\n \tcase RTE_PROC_INVALID:\n",
    "prefixes": [
        "2/2"
    ]
}